Browse Source

refactor: rename `CreateTime` to `CreatedTime`

pull/7304/head
Pranav C 8 months ago
parent
commit
21cd0012b9
  1. 2
      packages/nc-gui/components/smartsheet/Form.vue
  2. 2
      packages/nc-gui/components/smartsheet/header/Menu.vue
  3. 2
      packages/nc-gui/components/smartsheet/header/VirtualCellIcon.ts
  4. 2
      packages/nc-gui/components/template/Editor.vue
  5. 2
      packages/nc-gui/composables/useMultiSelect/index.ts
  6. 2
      packages/nc-gui/lang/ar.json
  7. 2
      packages/nc-gui/lang/bn_IN.json
  8. 2
      packages/nc-gui/lang/cs.json
  9. 2
      packages/nc-gui/lang/da.json
  10. 2
      packages/nc-gui/lang/de.json
  11. 2
      packages/nc-gui/lang/en.json
  12. 2
      packages/nc-gui/lang/es.json
  13. 2
      packages/nc-gui/lang/eu.json
  14. 2
      packages/nc-gui/lang/fa.json
  15. 2
      packages/nc-gui/lang/fi.json
  16. 2
      packages/nc-gui/lang/fr.json
  17. 2
      packages/nc-gui/lang/he.json
  18. 2
      packages/nc-gui/lang/hi.json
  19. 2
      packages/nc-gui/lang/hr.json
  20. 2
      packages/nc-gui/lang/id.json
  21. 2
      packages/nc-gui/lang/it.json
  22. 2
      packages/nc-gui/lang/ja.json
  23. 2
      packages/nc-gui/lang/ko.json
  24. 2
      packages/nc-gui/lang/lv.json
  25. 2
      packages/nc-gui/lang/nl.json
  26. 2
      packages/nc-gui/lang/no.json
  27. 2
      packages/nc-gui/lang/pl.json
  28. 2
      packages/nc-gui/lang/pt.json
  29. 2
      packages/nc-gui/lang/pt_BR.json
  30. 2
      packages/nc-gui/lang/ru.json
  31. 2
      packages/nc-gui/lang/sk.json
  32. 2
      packages/nc-gui/lang/sl.json
  33. 2
      packages/nc-gui/lang/sv.json
  34. 2
      packages/nc-gui/lang/th.json
  35. 2
      packages/nc-gui/lang/tr.json
  36. 2
      packages/nc-gui/lang/uk.json
  37. 2
      packages/nc-gui/lang/vi.json
  38. 2
      packages/nc-gui/lang/zh-Hans.json
  39. 2
      packages/nc-gui/lang/zh-Hant.json
  40. 4
      packages/nc-gui/utils/columnUtils.ts
  41. 2
      packages/nc-gui/utils/sortUtils.ts
  42. 6
      packages/nocodb-sdk/src/lib/UITypes.ts
  43. 2
      packages/nocodb-sdk/src/lib/formulaHelpers.ts
  44. 8
      packages/nocodb-sdk/src/lib/sqlUi/MssqlUi.ts
  45. 6
      packages/nocodb-sdk/src/lib/sqlUi/MysqlUi.ts
  46. 4
      packages/nocodb-sdk/src/lib/sqlUi/OracleUi.ts
  47. 8
      packages/nocodb-sdk/src/lib/sqlUi/PgUi.ts
  48. 6
      packages/nocodb-sdk/src/lib/sqlUi/SnowflakeUi.ts
  49. 8
      packages/nocodb-sdk/src/lib/sqlUi/SqliteUi.ts
  50. 10
      packages/nocodb/src/db/BaseModelSqlv2.ts
  51. 8
      packages/nocodb/src/db/conditionV2.ts
  52. 2
      packages/nocodb/src/db/formulav2/formulaQueryBuilderv2.ts
  53. 4
      packages/nocodb/src/helpers/columnHelpers.ts
  54. 2
      packages/nocodb/src/helpers/getColumnPropsFromUIDT.ts
  55. 2
      packages/nocodb/src/helpers/populateSamplePayload.ts
  56. 4
      packages/nocodb/src/modules/jobs/jobs/at-import/at-import.processor.ts
  57. 4
      packages/nocodb/src/modules/jobs/jobs/export-import/import.service.ts
  58. 4
      packages/nocodb/src/schema/swagger-v2.json
  59. 4
      packages/nocodb/src/schema/swagger.json
  60. 12
      packages/nocodb/src/services/columns.service.ts
  61. 4
      packages/nocodb/src/version-upgrader/ncXcdbCreatedAndUpdatedTimeUpgrader.ts

2
packages/nc-gui/components/smartsheet/Form.vue

@ -34,7 +34,7 @@ provide(IsGalleryInj, ref(false))
// todo: generate hideCols based on default values // todo: generate hideCols based on default values
const hiddenCols = ['created_at', 'updated_at'] const hiddenCols = ['created_at', 'updated_at']
const hiddenColTypes = [UITypes.Rollup, UITypes.Lookup, UITypes.Formula, UITypes.QrCode, UITypes.Barcode, UITypes.SpecificDBType, UITypes.CreateTime, UITypes.LastModifiedTime] const hiddenColTypes = [UITypes.Rollup, UITypes.Lookup, UITypes.Formula, UITypes.QrCode, UITypes.Barcode, UITypes.SpecificDBType, UITypes.CreatedTime, UITypes.LastModifiedTime]
const { isMobileMode, user } = useGlobal() const { isMobileMode, user } = useGlobal()

2
packages/nc-gui/components/smartsheet/header/Menu.vue

@ -280,7 +280,7 @@ const onInsertAfter = () => {
const isDeleteAllowed = computed(() => { const isDeleteAllowed = computed(() => {
if (!column?.value) return false if (!column?.value) return false
if (column.value.uidt && [UITypes.CreateTime, UITypes.LastModifiedTime].includes(column.value.uidt) && column.value.system) { if (column.value.uidt && [UITypes.CreatedTime, UITypes.LastModifiedTime].includes(column.value.uidt) && column.value.system) {
return false return false
} }
return true return true

2
packages/nc-gui/components/smartsheet/header/VirtualCellIcon.ts

@ -62,7 +62,7 @@ const renderIcon = (column: ColumnType, relationColumn?: ColumnType) => {
return { icon: iconMap.rollup, color: 'text-grey' } return { icon: iconMap.rollup, color: 'text-grey' }
case UITypes.Count: case UITypes.Count:
return { icon: CountIcon, color: 'text-grey' } return { icon: CountIcon, color: 'text-grey' }
case UITypes.CreateTime: case UITypes.CreatedTime:
case UITypes.LastModifiedTime: case UITypes.LastModifiedTime:
return { icon: iconMap.datetime, color: 'text-grey' } return { icon: iconMap.datetime, color: 'text-grey' }
} }

2
packages/nc-gui/components/template/Editor.vue

@ -100,7 +100,7 @@ const uiTypeOptions = ref<Option[]>(
.filter( .filter(
(uiType) => (uiType) =>
!isVirtualCol(UITypes[uiType]) && !isVirtualCol(UITypes[uiType]) &&
![UITypes.ForeignKey, UITypes.ID, UITypes.CreateTime, UITypes.LastModifiedTime, UITypes.Barcode, UITypes.Button].includes( ![UITypes.ForeignKey, UITypes.ID, UITypes.CreatedTime, UITypes.LastModifiedTime, UITypes.Barcode, UITypes.Button].includes(
UITypes[uiType], UITypes[uiType],
), ),
) )

2
packages/nc-gui/composables/useMultiSelect/index.ts

@ -136,7 +136,7 @@ export function useMultiSelect(
}) })
} }
if ([UITypes.DateTime, UITypes.CreateTime, UITypes.LastModifiedTime].includes(columnObj.uidt)) { if ([UITypes.DateTime, UITypes.CreatedTime, UITypes.LastModifiedTime].includes(columnObj.uidt)) {
// remove `"` // remove `"`
// e.g. "2023-05-12T08:03:53.000Z" -> 2023-05-12T08:03:53.000Z // e.g. "2023-05-12T08:03:53.000Z" -> 2023-05-12T08:03:53.000Z
textToCopy = textToCopy.replace(/["']/g, '') textToCopy = textToCopy.replace(/["']/g, '')

2
packages/nc-gui/lang/ar.json

@ -273,7 +273,7 @@
"Count": "العد", "Count": "العد",
"Lookup": "مشاهدة بيانات", "Lookup": "مشاهدة بيانات",
"DateTime": "تاريخ وقت", "DateTime": "تاريخ وقت",
"CreateTime": "إنشاء وقت", "CreatedTime": "إنشاء وقت",
"LastModifiedTime": "وقت آخر تعديل", "LastModifiedTime": "وقت آخر تعديل",
"AutoNumber": "عدد تلقائي", "AutoNumber": "عدد تلقائي",
"Barcode": "رمز", "Barcode": "رمز",

2
packages/nc-gui/lang/bn_IN.json

@ -273,7 +273,7 @@
"Count": "গণন", "Count": "গণন",
"Lookup": "খ", "Lookup": "খ",
"DateTime": "তিখ সময", "DateTime": "তিখ সময",
"CreateTime": "সমযি করন", "CreatedTime": "সমযি করন",
"LastModifiedTime": "শষ পরিবরিত সময", "LastModifiedTime": "শষ পরিবরিত সময",
"AutoNumber": "অট নমবর", "AutoNumber": "অট নমবর",
"Barcode": "বরকড", "Barcode": "বরকড",

2
packages/nc-gui/lang/cs.json

@ -273,7 +273,7 @@
"Count": "Počet", "Count": "Počet",
"Lookup": "Vyhledávání", "Lookup": "Vyhledávání",
"DateTime": "Datum a čas", "DateTime": "Datum a čas",
"CreateTime": "Vytvořit čas", "CreatedTime": "Vytvořit čas",
"LastModifiedTime": "Čas poslední úpravy", "LastModifiedTime": "Čas poslední úpravy",
"AutoNumber": "Automatické číslo", "AutoNumber": "Automatické číslo",
"Barcode": "Čárový kód", "Barcode": "Čárový kód",

2
packages/nc-gui/lang/da.json

@ -273,7 +273,7 @@
"Count": "Tælle", "Count": "Tælle",
"Lookup": "Kig op", "Lookup": "Kig op",
"DateTime": "Dato tid", "DateTime": "Dato tid",
"CreateTime": "Opret tid", "CreatedTime": "Opret tid",
"LastModifiedTime": "Sidste ændret tid", "LastModifiedTime": "Sidste ændret tid",
"AutoNumber": "Auto nummer.", "AutoNumber": "Auto nummer.",
"Barcode": "Stregkode.", "Barcode": "Stregkode.",

2
packages/nc-gui/lang/de.json

@ -273,7 +273,7 @@
"Count": "Zählen", "Count": "Zählen",
"Lookup": "Nachschlagen", "Lookup": "Nachschlagen",
"DateTime": "Datum/Zeit", "DateTime": "Datum/Zeit",
"CreateTime": "Zeit erstellen", "CreatedTime": "Zeit erstellen",
"LastModifiedTime": "Zuletzt bearbeitet", "LastModifiedTime": "Zuletzt bearbeitet",
"AutoNumber": "Auto-Nummerierung", "AutoNumber": "Auto-Nummerierung",
"Barcode": "Barcode", "Barcode": "Barcode",

2
packages/nc-gui/lang/en.json

@ -273,7 +273,7 @@
"Count": "Count", "Count": "Count",
"Lookup": "Lookup", "Lookup": "Lookup",
"DateTime": "Date Time", "DateTime": "Date Time",
"CreateTime": "Create Time", "CreatedTime": "Create Time",
"LastModifiedTime": "Last Modified Time", "LastModifiedTime": "Last Modified Time",
"AutoNumber": "Auto Number", "AutoNumber": "Auto Number",
"Barcode": "Barcode", "Barcode": "Barcode",

2
packages/nc-gui/lang/es.json

@ -273,7 +273,7 @@
"Count": "Cuenta", "Count": "Cuenta",
"Lookup": "Búsqueda", "Lookup": "Búsqueda",
"DateTime": "Fecha y hora", "DateTime": "Fecha y hora",
"CreateTime": "Fecha de creación", "CreatedTime": "Fecha de creación",
"LastModifiedTime": "Fecha de modificación", "LastModifiedTime": "Fecha de modificación",
"AutoNumber": "Número automático", "AutoNumber": "Número automático",
"Barcode": "Código de barras", "Barcode": "Código de barras",

2
packages/nc-gui/lang/eu.json

@ -273,7 +273,7 @@
"Count": "Count", "Count": "Count",
"Lookup": "Lookup", "Lookup": "Lookup",
"DateTime": "Date Time", "DateTime": "Date Time",
"CreateTime": "Create Time", "CreatedTime": "Create Time",
"LastModifiedTime": "Azkeneko aldatze ordua", "LastModifiedTime": "Azkeneko aldatze ordua",
"AutoNumber": "Auto Number", "AutoNumber": "Auto Number",
"Barcode": "Barcode", "Barcode": "Barcode",

2
packages/nc-gui/lang/fa.json

@ -273,7 +273,7 @@
"Count": "شمردن", "Count": "شمردن",
"Lookup": "جستوجو", "Lookup": "جستوجو",
"DateTime": "تاریخ و زمان", "DateTime": "تاریخ و زمان",
"CreateTime": "ایجاد زمان", "CreatedTime": "ایجاد زمان",
"LastModifiedTime": "زمان آخرین اصلاح", "LastModifiedTime": "زمان آخرین اصلاح",
"AutoNumber": "شماره خودکار", "AutoNumber": "شماره خودکار",
"Barcode": "بارکد", "Barcode": "بارکد",

2
packages/nc-gui/lang/fi.json

@ -273,7 +273,7 @@
"Count": "Kreivi", "Count": "Kreivi",
"Lookup": "Katso ylös", "Lookup": "Katso ylös",
"DateTime": "Treffiaika", "DateTime": "Treffiaika",
"CreateTime": "Luoda aikaa", "CreatedTime": "Luoda aikaa",
"LastModifiedTime": "Viimeksi muutettu aika", "LastModifiedTime": "Viimeksi muutettu aika",
"AutoNumber": "Automaattinen numero", "AutoNumber": "Automaattinen numero",
"Barcode": "Viivakoodi", "Barcode": "Viivakoodi",

2
packages/nc-gui/lang/fr.json

@ -273,7 +273,7 @@
"Count": "Compteur", "Count": "Compteur",
"Lookup": "Consulter", "Lookup": "Consulter",
"DateTime": "Date et heure", "DateTime": "Date et heure",
"CreateTime": "Date de création", "CreatedTime": "Date de création",
"LastModifiedTime": "Dernière modification", "LastModifiedTime": "Dernière modification",
"AutoNumber": "Numérotation automatique", "AutoNumber": "Numérotation automatique",
"Barcode": "Code-barres", "Barcode": "Code-barres",

2
packages/nc-gui/lang/he.json

@ -273,7 +273,7 @@
"Count": "ספירה", "Count": "ספירה",
"Lookup": "הבט מעלה", "Lookup": "הבט מעלה",
"DateTime": "תאריך שעה", "DateTime": "תאריך שעה",
"CreateTime": "צור זמן", "CreatedTime": "צור זמן",
"LastModifiedTime": "שונה לאחרונה", "LastModifiedTime": "שונה לאחרונה",
"AutoNumber": "מספר אוטומטי", "AutoNumber": "מספר אוטומטי",
"Barcode": "ברקוד", "Barcode": "ברקוד",

2
packages/nc-gui/lang/hi.json

@ -273,7 +273,7 @@
"Count": "गिनत करन", "Count": "गिनत करन",
"Lookup": "द", "Lookup": "द",
"DateTime": "दिक और समय", "DateTime": "दिक और समय",
"CreateTime": "निण क समय", "CreatedTime": "निण क समय",
"LastModifiedTime": "अिम सित समय", "LastModifiedTime": "अिम सित समय",
"AutoNumber": "वहन नबर", "AutoNumber": "वहन नबर",
"Barcode": "बरकड", "Barcode": "बरकड",

2
packages/nc-gui/lang/hr.json

@ -273,7 +273,7 @@
"Count": "Računati", "Count": "Računati",
"Lookup": "Pogledaj", "Lookup": "Pogledaj",
"DateTime": "Datum vrijeme", "DateTime": "Datum vrijeme",
"CreateTime": "Stvoriti vrijeme", "CreatedTime": "Stvoriti vrijeme",
"LastModifiedTime": "Posljednje izmijenjeno vrijeme", "LastModifiedTime": "Posljednje izmijenjeno vrijeme",
"AutoNumber": "Automatski broj", "AutoNumber": "Automatski broj",
"Barcode": "Barkod", "Barcode": "Barkod",

2
packages/nc-gui/lang/id.json

@ -273,7 +273,7 @@
"Count": "Menghitung", "Count": "Menghitung",
"Lookup": "Mencari", "Lookup": "Mencari",
"DateTime": "Tanggal Waktu", "DateTime": "Tanggal Waktu",
"CreateTime": "Buat waktu", "CreatedTime": "Buat waktu",
"LastModifiedTime": "Waktu yang dimodifikasi terakhir", "LastModifiedTime": "Waktu yang dimodifikasi terakhir",
"AutoNumber": "Nomor otomatis", "AutoNumber": "Nomor otomatis",
"Barcode": "Barcode.", "Barcode": "Barcode.",

2
packages/nc-gui/lang/it.json

@ -273,7 +273,7 @@
"Count": "Contatore", "Count": "Contatore",
"Lookup": "Consultazione", "Lookup": "Consultazione",
"DateTime": "Data e ora", "DateTime": "Data e ora",
"CreateTime": "Data di creazione", "CreatedTime": "Data di creazione",
"LastModifiedTime": "Data di ultima modifica", "LastModifiedTime": "Data di ultima modifica",
"AutoNumber": "Numerazione automatica", "AutoNumber": "Numerazione automatica",
"Barcode": "Codice a barre", "Barcode": "Codice a barre",

2
packages/nc-gui/lang/ja.json

@ -273,7 +273,7 @@
"Count": "カウント", "Count": "カウント",
"Lookup": "ルックアップ", "Lookup": "ルックアップ",
"DateTime": "DateTime型", "DateTime": "DateTime型",
"CreateTime": "作成時刻", "CreatedTime": "作成時刻",
"LastModifiedTime": "最終更新日時", "LastModifiedTime": "最終更新日時",
"AutoNumber": "自動採番", "AutoNumber": "自動採番",
"Barcode": "バーコード", "Barcode": "バーコード",

2
packages/nc-gui/lang/ko.json

@ -273,7 +273,7 @@
"Count": "카운트", "Count": "카운트",
"Lookup": "조회", "Lookup": "조회",
"DateTime": "일시", "DateTime": "일시",
"CreateTime": "생성시간", "CreatedTime": "생성시간",
"LastModifiedTime": "최종수정시간", "LastModifiedTime": "최종수정시간",
"AutoNumber": "자동번호", "AutoNumber": "자동번호",
"Barcode": "바코드", "Barcode": "바코드",

2
packages/nc-gui/lang/lv.json

@ -273,7 +273,7 @@
"Count": "Skaits", "Count": "Skaits",
"Lookup": "Uzmeklēšana", "Lookup": "Uzmeklēšana",
"DateTime": "Datums un laiks", "DateTime": "Datums un laiks",
"CreateTime": "Izveidošanas laiks", "CreatedTime": "Izveidošanas laiks",
"LastModifiedTime": "Modificēšanas laiks", "LastModifiedTime": "Modificēšanas laiks",
"AutoNumber": "Automātiska numerācija", "AutoNumber": "Automātiska numerācija",
"Barcode": "Svītru kods", "Barcode": "Svītru kods",

2
packages/nc-gui/lang/nl.json

@ -273,7 +273,7 @@
"Count": "Telling", "Count": "Telling",
"Lookup": "Zoekopdracht", "Lookup": "Zoekopdracht",
"DateTime": "Tijdstip", "DateTime": "Tijdstip",
"CreateTime": "Maak Tijd", "CreatedTime": "Maak Tijd",
"LastModifiedTime": "Laatst gewijzigd", "LastModifiedTime": "Laatst gewijzigd",
"AutoNumber": "Automatische nummering", "AutoNumber": "Automatische nummering",
"Barcode": "Barcode", "Barcode": "Barcode",

2
packages/nc-gui/lang/no.json

@ -273,7 +273,7 @@
"Count": "Telle", "Count": "Telle",
"Lookup": "Se opp", "Lookup": "Se opp",
"DateTime": "Dato tid", "DateTime": "Dato tid",
"CreateTime": "Skape tid", "CreatedTime": "Skape tid",
"LastModifiedTime": "Sist endret tid", "LastModifiedTime": "Sist endret tid",
"AutoNumber": "Auto nummer", "AutoNumber": "Auto nummer",
"Barcode": "Strekkode", "Barcode": "Strekkode",

2
packages/nc-gui/lang/pl.json

@ -273,7 +273,7 @@
"Count": "Licznik", "Count": "Licznik",
"Lookup": "Wyszukiwanie", "Lookup": "Wyszukiwanie",
"DateTime": "Data i czas", "DateTime": "Data i czas",
"CreateTime": "Data utworzenia", "CreatedTime": "Data utworzenia",
"LastModifiedTime": "Data ostatniej modyfikacji", "LastModifiedTime": "Data ostatniej modyfikacji",
"AutoNumber": "Automatyczny numer", "AutoNumber": "Automatyczny numer",
"Barcode": "Kod kreskowy", "Barcode": "Kod kreskowy",

2
packages/nc-gui/lang/pt.json

@ -273,7 +273,7 @@
"Count": "Contar", "Count": "Contar",
"Lookup": "Olho para cima", "Lookup": "Olho para cima",
"DateTime": "Data hora", "DateTime": "Data hora",
"CreateTime": "Criar tempo", "CreatedTime": "Criar tempo",
"LastModifiedTime": "Última hora modificada", "LastModifiedTime": "Última hora modificada",
"AutoNumber": "Número automático", "AutoNumber": "Número automático",
"Barcode": "Código de barras", "Barcode": "Código de barras",

2
packages/nc-gui/lang/pt_BR.json

@ -273,7 +273,7 @@
"Count": "Quantidade", "Count": "Quantidade",
"Lookup": "Procurar", "Lookup": "Procurar",
"DateTime": "Data e hora", "DateTime": "Data e hora",
"CreateTime": "Hora da criação", "CreatedTime": "Hora da criação",
"LastModifiedTime": "Hora da última alteração", "LastModifiedTime": "Hora da última alteração",
"AutoNumber": "Número automático", "AutoNumber": "Número automático",
"Barcode": "Código de barras", "Barcode": "Código de barras",

2
packages/nc-gui/lang/ru.json

@ -273,7 +273,7 @@
"Count": "Количество", "Count": "Количество",
"Lookup": "Подстановка (Lookup)", "Lookup": "Подстановка (Lookup)",
"DateTime": "Дата и время", "DateTime": "Дата и время",
"CreateTime": "Создан", "CreatedTime": "Создан",
"LastModifiedTime": "Изменен", "LastModifiedTime": "Изменен",
"AutoNumber": "Счетчик", "AutoNumber": "Счетчик",
"Barcode": "Штрих-код", "Barcode": "Штрих-код",

2
packages/nc-gui/lang/sk.json

@ -273,7 +273,7 @@
"Count": "Počítajte", "Count": "Počítajte",
"Lookup": "Vyhľadávanie", "Lookup": "Vyhľadávanie",
"DateTime": "Dátum Čas", "DateTime": "Dátum Čas",
"CreateTime": "Vytvoriť čas", "CreatedTime": "Vytvoriť čas",
"LastModifiedTime": "Čas poslednej úpravy", "LastModifiedTime": "Čas poslednej úpravy",
"AutoNumber": "Automatické číslo", "AutoNumber": "Automatické číslo",
"Barcode": "Čiarový kód", "Barcode": "Čiarový kód",

2
packages/nc-gui/lang/sl.json

@ -273,7 +273,7 @@
"Count": "Count.", "Count": "Count.",
"Lookup": "Poglej gor", "Lookup": "Poglej gor",
"DateTime": "Datum čas", "DateTime": "Datum čas",
"CreateTime": "Ustvarite čas", "CreatedTime": "Ustvarite čas",
"LastModifiedTime": "Zadnji spremenjen čas", "LastModifiedTime": "Zadnji spremenjen čas",
"AutoNumber": "Samodejna številka", "AutoNumber": "Samodejna številka",
"Barcode": "Črtna koda", "Barcode": "Črtna koda",

2
packages/nc-gui/lang/sv.json

@ -273,7 +273,7 @@
"Count": "Räkna", "Count": "Räkna",
"Lookup": "Slå upp", "Lookup": "Slå upp",
"DateTime": "Datum Tid", "DateTime": "Datum Tid",
"CreateTime": "Skapa tid", "CreatedTime": "Skapa tid",
"LastModifiedTime": "Senast ändrad tid", "LastModifiedTime": "Senast ändrad tid",
"AutoNumber": "Automatisk nummer", "AutoNumber": "Automatisk nummer",
"Barcode": "Streckkod", "Barcode": "Streckkod",

2
packages/nc-gui/lang/th.json

@ -273,7 +273,7 @@
"Count": "นบ", "Count": "นบ",
"Lookup": "การคนหา", "Lookup": "การคนหา",
"DateTime": "วนเวลา", "DateTime": "วนเวลา",
"CreateTime": "สรางเวลา", "CreatedTime": "สรางเวลา",
"LastModifiedTime": "เวลาทแกไขลาสด", "LastModifiedTime": "เวลาทแกไขลาสด",
"AutoNumber": "หมายเลขอตโนม", "AutoNumber": "หมายเลขอตโนม",
"Barcode": "บารโคด", "Barcode": "บารโคด",

2
packages/nc-gui/lang/tr.json

@ -273,7 +273,7 @@
"Count": "Say", "Count": "Say",
"Lookup": "Referans", "Lookup": "Referans",
"DateTime": "Tarih saat", "DateTime": "Tarih saat",
"CreateTime": "Oluşturma zamanı", "CreatedTime": "Oluşturma zamanı",
"LastModifiedTime": "Son değiştirilme", "LastModifiedTime": "Son değiştirilme",
"AutoNumber": "Otomatik Sayı", "AutoNumber": "Otomatik Sayı",
"Barcode": "Barkod", "Barcode": "Barkod",

2
packages/nc-gui/lang/uk.json

@ -273,7 +273,7 @@
"Count": "Кількість", "Count": "Кількість",
"Lookup": "Пошук", "Lookup": "Пошук",
"DateTime": "Дата і час", "DateTime": "Дата і час",
"CreateTime": "Час створення", "CreatedTime": "Час створення",
"LastModifiedTime": "Час останньої зміни", "LastModifiedTime": "Час останньої зміни",
"AutoNumber": "Автоматичне прирощування", "AutoNumber": "Автоматичне прирощування",
"Barcode": "Штрих-код", "Barcode": "Штрих-код",

2
packages/nc-gui/lang/vi.json

@ -273,7 +273,7 @@
"Count": "Đếm", "Count": "Đếm",
"Lookup": "Tra cứu", "Lookup": "Tra cứu",
"DateTime": "Ngày giờ", "DateTime": "Ngày giờ",
"CreateTime": "Tạo thời gian", "CreatedTime": "Tạo thời gian",
"LastModifiedTime": "Thời gian sửa đổi lần cuối", "LastModifiedTime": "Thời gian sửa đổi lần cuối",
"AutoNumber": "Số tự động", "AutoNumber": "Số tự động",
"Barcode": "Mã vạch.", "Barcode": "Mã vạch.",

2
packages/nc-gui/lang/zh-Hans.json

@ -273,7 +273,7 @@
"Count": "计数", "Count": "计数",
"Lookup": "查找", "Lookup": "查找",
"DateTime": "日期时间", "DateTime": "日期时间",
"CreateTime": "创建时间", "CreatedTime": "创建时间",
"LastModifiedTime": "最后修改时间", "LastModifiedTime": "最后修改时间",
"AutoNumber": "自动编号", "AutoNumber": "自动编号",
"Barcode": "条形码", "Barcode": "条形码",

2
packages/nc-gui/lang/zh-Hant.json

@ -273,7 +273,7 @@
"Count": "計數", "Count": "計數",
"Lookup": "查閱", "Lookup": "查閱",
"DateTime": "日期時間", "DateTime": "日期時間",
"CreateTime": "創建時間", "CreatedTime": "創建時間",
"LastModifiedTime": "最後修改時間", "LastModifiedTime": "最後修改時間",
"AutoNumber": "自動編號", "AutoNumber": "自動編號",
"Barcode": "條碼", "Barcode": "條碼",

4
packages/nc-gui/utils/columnUtils.ts

@ -139,7 +139,7 @@ const uiTypes = [
icon: iconMap.account, icon: iconMap.account,
}, },
{ {
name: UITypes.CreateTime, name: UITypes.CreatedTime,
icon: iconMap.clock, icon: iconMap.clock,
}, },
{ {
@ -153,7 +153,7 @@ const getUIDTIcon = (uidt: UITypes | string) => {
[ [
...uiTypes, ...uiTypes,
{ {
name: UITypes.CreateTime, name: UITypes.CreatedTime,
icon: iconMap.calendar, icon: iconMap.calendar,
}, },
{ {

2
packages/nc-gui/utils/sortUtils.ts

@ -15,7 +15,7 @@ export const getSortDirectionOptions = (uidt: UITypes | string) => {
case UITypes.PhoneNumber: case UITypes.PhoneNumber:
case UITypes.Date: case UITypes.Date:
case UITypes.DateTime: case UITypes.DateTime:
case UITypes.CreateTime: case UITypes.CreatedTime:
case UITypes.LastModifiedTime: case UITypes.LastModifiedTime:
return [ return [
{ text: '1 → 9', value: 'asc' }, { text: '1 → 9', value: 'asc' },

6
packages/nocodb-sdk/src/lib/UITypes.ts

@ -29,7 +29,7 @@ enum UITypes {
Rollup = 'Rollup', Rollup = 'Rollup',
Count = 'Count', Count = 'Count',
DateTime = 'DateTime', DateTime = 'DateTime',
CreateTime = 'CreateTime', CreatedTime = 'CreatedTime',
LastModifiedTime = 'LastModifiedTime', LastModifiedTime = 'LastModifiedTime',
AutoNumber = 'AutoNumber', AutoNumber = 'AutoNumber',
Geometry = 'Geometry', Geometry = 'Geometry',
@ -83,7 +83,7 @@ export function isVirtualCol(
UITypes.Rollup, UITypes.Rollup,
UITypes.Lookup, UITypes.Lookup,
UITypes.Links, UITypes.Links,
UITypes.CreateTime, UITypes.CreatedTime,
UITypes.LastModifiedTime, UITypes.LastModifiedTime,
// UITypes.Count, // UITypes.Count,
].includes(<UITypes>(typeof col === 'object' ? col?.uidt : col)); ].includes(<UITypes>(typeof col === 'object' ? col?.uidt : col));
@ -96,7 +96,7 @@ export function isCreatedTimeOrUpdatedTimeCol(
| ColumnType | ColumnType
) { ) {
return [ return [
UITypes.CreateTime, UITypes.CreatedTime,
UITypes.LastModifiedTime, UITypes.LastModifiedTime,
].includes(<UITypes>(typeof col === 'object' ? col?.uidt : col)); ].includes(<UITypes>(typeof col === 'object' ? col?.uidt : col));
} }

2
packages/nocodb-sdk/src/lib/formulaHelpers.ts

@ -1528,7 +1528,7 @@ async function extractColumnIdentifierType({
// date // date
case UITypes.Date: case UITypes.Date:
case UITypes.DateTime: case UITypes.DateTime:
case UITypes.CreateTime: case UITypes.CreatedTime:
case UITypes.LastModifiedTime: case UITypes.LastModifiedTime:
res.dataType = FormulaDataTypes.DATE; res.dataType = FormulaDataTypes.DATE;
break; break;

8
packages/nocodb-sdk/src/lib/sqlUi/MssqlUi.ts

@ -107,7 +107,7 @@ export class MssqlUi {
dtxp: '', dtxp: '',
dtxs: '', dtxs: '',
altered: 1, altered: 1,
uidt: UITypes.CreateTime, uidt: UITypes.CreatedTime,
uip: '', uip: '',
uicn: '', uicn: '',
system: true, system: true,
@ -593,7 +593,7 @@ export class MssqlUi {
case 'date': case 'date':
return 'Date'; return 'Date';
case 'datetime': case 'datetime':
return 'CreateTime'; return 'CreatedTime';
case 'time': case 'time':
return 'Time'; return 'Time';
case 'year': case 'year':
@ -735,7 +735,7 @@ export class MssqlUi {
case 'DateTime': case 'DateTime':
colProp.dt = 'datetimeoffset'; colProp.dt = 'datetimeoffset';
break; break;
case 'CreateTime': case 'CreatedTime':
colProp.dt = 'datetime'; colProp.dt = 'datetime';
colProp.cdf = 'GETDATE()'; colProp.cdf = 'GETDATE()';
break; break;
@ -889,7 +889,7 @@ export class MssqlUi {
return ['date']; return ['date'];
case 'DateTime': case 'DateTime':
case 'CreateTime': case 'CreatedTime':
case 'LastModifiedTime': case 'LastModifiedTime':
return [ return [
'datetimeoffset', 'datetimeoffset',

6
packages/nocodb-sdk/src/lib/sqlUi/MysqlUi.ts

@ -111,7 +111,7 @@ export class MysqlUi {
dtxp: '', dtxp: '',
dtxs: '', dtxs: '',
altered: 1, altered: 1,
uidt: UITypes.CreateTime, uidt: UITypes.CreatedTime,
uip: '', uip: '',
uicn: '', uicn: '',
system: true, system: true,
@ -1073,7 +1073,7 @@ export class MysqlUi {
case 'DateTime': case 'DateTime':
colProp.dt = 'datetime'; colProp.dt = 'datetime';
break; break;
case 'CreateTime': case 'CreatedTime':
colProp.dt = 'timestamp'; colProp.dt = 'timestamp';
colProp.cdf = 'CURRENT_TIMESTAMP'; colProp.cdf = 'CURRENT_TIMESTAMP';
break; break;
@ -1265,7 +1265,7 @@ export class MysqlUi {
return ['date', 'datetime', 'timestamp', 'varchar']; return ['date', 'datetime', 'timestamp', 'varchar'];
case 'DateTime': case 'DateTime':
case 'CreateTime': case 'CreatedTime':
case 'LastModifiedTime': case 'LastModifiedTime':
return ['datetime', 'timestamp', 'varchar']; return ['datetime', 'timestamp', 'varchar'];

4
packages/nocodb-sdk/src/lib/sqlUi/OracleUi.ts

@ -775,7 +775,7 @@ export class OracleUi {
case 'date': case 'date':
return 'Date'; return 'Date';
case 'datetime': case 'datetime':
return 'CreateTime'; return 'CreatedTime';
case 'time': case 'time':
return 'Time'; return 'Time';
case 'year': case 'year':
@ -915,7 +915,7 @@ export class OracleUi {
case 'DateTime': case 'DateTime':
colProp.dt = 'timestamp'; colProp.dt = 'timestamp';
break; break;
case 'CreateTime': case 'CreatedTime':
colProp.dt = 'timestamp'; colProp.dt = 'timestamp';
break; break;
case 'LastModifiedTime': case 'LastModifiedTime':

8
packages/nocodb-sdk/src/lib/sqlUi/PgUi.ts

@ -170,7 +170,7 @@ export class PgUi {
dtxp: '', dtxp: '',
dtxs: '', dtxs: '',
altered: 1, altered: 1,
uidt: UITypes.CreateTime, uidt: UITypes.CreatedTime,
uip: '', uip: '',
uicn: '', uicn: '',
system: true, system: true,
@ -1551,7 +1551,7 @@ export class PgUi {
case 'date': case 'date':
return 'Date'; return 'Date';
case 'datetime': case 'datetime':
return 'CreateTime'; return 'CreatedTime';
case 'time': case 'time':
return 'Time'; return 'Time';
case 'year': case 'year':
@ -1687,7 +1687,7 @@ export class PgUi {
case 'DateTime': case 'DateTime':
colProp.dt = 'timestamp'; colProp.dt = 'timestamp';
break; break;
case 'CreateTime': case 'CreatedTime':
colProp.dt = 'timestamp'; colProp.dt = 'timestamp';
colProp.cdf = 'now()'; colProp.cdf = 'now()';
break; break;
@ -1937,7 +1937,7 @@ export class PgUi {
]; ];
case 'DateTime': case 'DateTime':
case 'CreateTime': case 'CreatedTime':
case 'LastModifiedTime': case 'LastModifiedTime':
return [ return [
'timestamp', 'timestamp',

6
packages/nocodb-sdk/src/lib/sqlUi/SnowflakeUi.ts

@ -106,7 +106,7 @@ export class SnowflakeUi {
dtxp: '', dtxp: '',
dtxs: '', dtxs: '',
altered: 1, altered: 1,
uidt: UITypes.CreateTime, uidt: UITypes.CreatedTime,
uip: '', uip: '',
uicn: '', uicn: '',
system: true, system: true,
@ -778,7 +778,7 @@ export class SnowflakeUi {
case 'DateTime': case 'DateTime':
colProp.dt = 'TIMESTAMP'; colProp.dt = 'TIMESTAMP';
break; break;
case 'CreateTime': case 'CreatedTime':
colProp.dt = 'TIMESTAMP'; colProp.dt = 'TIMESTAMP';
colProp.cdf = 'current_timestamp()'; colProp.cdf = 'current_timestamp()';
break; break;
@ -956,7 +956,7 @@ export class SnowflakeUi {
return ['DATE', 'TIMESTAMP']; return ['DATE', 'TIMESTAMP'];
case 'DateTime': case 'DateTime':
case 'CreateTime': case 'CreatedTime':
case 'LastModifiedTime': case 'LastModifiedTime':
return ['TIMESTAMP']; return ['TIMESTAMP'];

8
packages/nocodb-sdk/src/lib/sqlUi/SqliteUi.ts

@ -94,7 +94,7 @@ export class SqliteUi {
dtxp: '', dtxp: '',
dtxs: '', dtxs: '',
altered: 1, altered: 1,
uidt: UITypes.CreateTime, uidt: UITypes.CreatedTime,
uip: '', uip: '',
uicn: '', uicn: '',
system: true, system: true,
@ -492,7 +492,7 @@ export class SqliteUi {
case 'date': case 'date':
return 'Date'; return 'Date';
case 'datetime': case 'datetime':
return 'CreateTime'; return 'CreatedTime';
case 'time': case 'time':
return 'Time'; return 'Time';
case 'year': case 'year':
@ -628,7 +628,7 @@ export class SqliteUi {
case 'DateTime': case 'DateTime':
colProp.dt = 'datetime'; colProp.dt = 'datetime';
break; break;
case 'CreateTime': case 'CreatedTime':
colProp.dt = 'datetime'; colProp.dt = 'datetime';
colProp.cdf = 'CURRENT_TIMESTAMP'; colProp.cdf = 'CURRENT_TIMESTAMP';
break; break;
@ -841,7 +841,7 @@ export class SqliteUi {
return ['date', 'varchar']; return ['date', 'varchar'];
case 'DateTime': case 'DateTime':
case 'CreateTime': case 'CreatedTime':
case 'LastModifiedTime': case 'LastModifiedTime':
return ['datetime', 'timestamp']; return ['datetime', 'timestamp'];

10
packages/nocodb/src/db/BaseModelSqlv2.ts

@ -103,9 +103,9 @@ function checkColumnRequired(
export function getColumnName(column: Column<any>, columns: Column[] = []) { export function getColumnName(column: Column<any>, columns: Column[] = []) {
switch (column.uidt) { switch (column.uidt) {
case UITypes.CreateTime: { case UITypes.CreatedTime: {
const createdTimeSystemCol = columns.find( const createdTimeSystemCol = columns.find(
(col) => col.system && col.uidt === UITypes.CreateTime, (col) => col.system && col.uidt === UITypes.CreatedTime,
); );
if (createdTimeSystemCol) return createdTimeSystemCol.column_name; if (createdTimeSystemCol) return createdTimeSystemCol.column_name;
return column.column_name || 'created_at'; return column.column_name || 'created_at';
@ -2135,7 +2135,7 @@ class BaseModelSqlv2 {
if (!checkColumnRequired(column, fields, extractPkAndPv)) continue; if (!checkColumnRequired(column, fields, extractPkAndPv)) continue;
switch (column.uidt) { switch (column.uidt) {
case UITypes.CreateTime: case UITypes.CreatedTime:
case UITypes.LastModifiedTime: case UITypes.LastModifiedTime:
case UITypes.DateTime: case UITypes.DateTime:
{ {
@ -5639,7 +5639,7 @@ class BaseModelSqlv2 {
[ [
UITypes.Attachment, UITypes.Attachment,
UITypes.User, UITypes.User,
UITypes.CreateTime, UITypes.CreatedTime,
UITypes.LastModifiedTime, UITypes.LastModifiedTime,
].includes(c.uidt), ].includes(c.uidt),
) )
@ -5647,7 +5647,7 @@ class BaseModelSqlv2 {
for (const column of this.model.columns) { for (const column of this.model.columns) {
if ( if (
isInsertData && isInsertData &&
column.uidt === UITypes.CreateTime && column.uidt === UITypes.CreatedTime &&
column.system column.system
) { ) {
data[column.column_name] = Noco.ncMeta.now(); data[column.column_name] = Noco.ncMeta.now();

8
packages/nocodb/src/db/conditionV2.ts

@ -556,7 +556,7 @@ const parseConditionV2 = async (
[ [
UITypes.Date, UITypes.Date,
UITypes.DateTime, UITypes.DateTime,
UITypes.CreateTime, UITypes.CreatedTime,
UITypes.LastModifiedTime, UITypes.LastModifiedTime,
].includes(column.uidt) ].includes(column.uidt)
) { ) {
@ -673,7 +673,7 @@ const parseConditionV2 = async (
if ( if (
[ [
UITypes.DateTime, UITypes.DateTime,
UITypes.CreateTime, UITypes.CreatedTime,
UITypes.LastModifiedTime, UITypes.LastModifiedTime,
].includes(column.uidt) ].includes(column.uidt)
) { ) {
@ -962,7 +962,7 @@ const parseConditionV2 = async (
!isNumericCol(column.uidt) && !isNumericCol(column.uidt) &&
![ ![
UITypes.Date, UITypes.Date,
UITypes.CreateTime, UITypes.CreatedTime,
UITypes.LastModifiedTime, UITypes.LastModifiedTime,
UITypes.DateTime, UITypes.DateTime,
UITypes.Time, UITypes.Time,
@ -985,7 +985,7 @@ const parseConditionV2 = async (
![ ![
UITypes.Date, UITypes.Date,
UITypes.DateTime, UITypes.DateTime,
UITypes.CreateTime, UITypes.CreatedTime,
UITypes.LastModifiedTime, UITypes.LastModifiedTime,
UITypes.Time, UITypes.Time,
].includes(column.uidt) ].includes(column.uidt)

2
packages/nocodb/src/db/formulav2/formulaQueryBuilderv2.ts

@ -638,7 +638,7 @@ async function _formulaQueryBuilder(
}; };
}; };
break; break;
case UITypes.CreateTime: case UITypes.CreatedTime:
case UITypes.LastModifiedTime: case UITypes.LastModifiedTime:
case UITypes.DateTime: case UITypes.DateTime:
{ {

4
packages/nocodb/src/helpers/columnHelpers.ts

@ -289,13 +289,13 @@ export const sanitizeColumnName = (name: string) => {
}; };
// if column is an alias column then return the original column // if column is an alias column then return the original column
// for example CreatedTime is an alias column for CreateTime system column // for example CreatedTime is an alias column for CreatedTime system column
export const getRefColumnIfAlias = async ( export const getRefColumnIfAlias = async (
column: Column, column: Column,
columns?: Column[], columns?: Column[],
) => { ) => {
if ( if (
!([UITypes.CreateTime, UITypes.LastModifiedTime] as UITypes[]).includes( !([UITypes.CreatedTime, UITypes.LastModifiedTime] as UITypes[]).includes(
column.uidt, column.uidt,
) )
) )

2
packages/nocodb/src/helpers/getColumnPropsFromUIDT.ts

@ -39,7 +39,7 @@ export default async function getColumnPropsFromUIDT(
const finalColumnMeta = { ...newColumn, ...column }; const finalColumnMeta = { ...newColumn, ...column };
if (finalColumnMeta.uidt === UITypes.CreateTime) { if (finalColumnMeta.uidt === UITypes.CreatedTime) {
finalColumnMeta.column_name = 'created_at'; finalColumnMeta.column_name = 'created_at';
} else if (finalColumnMeta.uidt === UITypes.LastModifiedTime) { } else if (finalColumnMeta.uidt === UITypes.LastModifiedTime) {
finalColumnMeta.column_name = 'updated_at'; finalColumnMeta.column_name = 'updated_at';

2
packages/nocodb/src/helpers/populateSamplePayload.ts

@ -270,7 +270,7 @@ async function getSampleColumnValue(column: Column): Promise<any> {
return new Date(); return new Date();
} }
break; break;
case UITypes.CreateTime: case UITypes.CreatedTime:
{ {
return new Date(); return new Date();
} }

4
packages/nocodb/src/modules/jobs/jobs/at-import/at-import.processor.ts

@ -364,7 +364,7 @@ export class AtImportProcessor {
// types email & url are marked as text // types email & url are marked as text
// types currency & percent, duration are marked as number // types currency & percent, duration are marked as number
// types createTime & modifiedTime are marked as formula // types CreatedTime & modifiedTime are marked as formula
switch (col.type) { switch (col.type) {
case 'text': case 'text':
@ -1437,7 +1437,7 @@ export class AtImportProcessor {
break; break;
case UITypes.DateTime: case UITypes.DateTime:
case UITypes.CreateTime: case UITypes.CreatedTime:
case UITypes.LastModifiedTime: case UITypes.LastModifiedTime:
rec[key] = dayjs(value).format('YYYY-MM-DD HH:mm'); rec[key] = dayjs(value).format('YYYY-MM-DD HH:mm');
break; break;

4
packages/nocodb/src/modules/jobs/jobs/export-import/import.service.ts

@ -766,7 +766,7 @@ export class ImportService {
a.uidt === UITypes.Rollup || a.uidt === UITypes.Rollup ||
a.uidt === UITypes.Formula || a.uidt === UITypes.Formula ||
a.uidt === UITypes.QrCode || a.uidt === UITypes.QrCode ||
a.uidt === UITypes.CreateTime || a.uidt === UITypes.CreatedTime ||
a.uidt === UITypes.LastModifiedTime || a.uidt === UITypes.LastModifiedTime ||
a.uidt === UITypes.Barcode, a.uidt === UITypes.Barcode,
), ),
@ -895,7 +895,7 @@ export class ImportService {
} }
} }
} else if ( } else if (
col.uidt === UITypes.CreateTime || col.uidt === UITypes.CreatedTime ||
col.uidt === UITypes.LastModifiedTime col.uidt === UITypes.LastModifiedTime
) { ) {
const freshModelData = await this.columnsService.columnAdd({ const freshModelData = await this.columnsService.columnAdd({

4
packages/nocodb/src/schema/swagger-v2.json

@ -12096,7 +12096,7 @@
"Checkbox", "Checkbox",
"Collaborator", "Collaborator",
"Count", "Count",
"CreateTime", "CreatedTime",
"Currency", "Currency",
"Date", "Date",
"DateTime", "DateTime",
@ -15314,7 +15314,7 @@
"Checkbox", "Checkbox",
"Collaborator", "Collaborator",
"Count", "Count",
"CreateTime", "CreatedTime",
"Currency", "Currency",
"Date", "Date",
"DateTime", "DateTime",

4
packages/nocodb/src/schema/swagger.json

@ -17313,7 +17313,7 @@
"Checkbox", "Checkbox",
"Collaborator", "Collaborator",
"Count", "Count",
"CreateTime", "CreatedTime",
"Currency", "Currency",
"Date", "Date",
"DateTime", "DateTime",
@ -20534,7 +20534,7 @@
"Checkbox", "Checkbox",
"Collaborator", "Collaborator",
"Count", "Count",
"CreateTime", "CreatedTime",
"Currency", "Currency",
"Date", "Date",
"DateTime", "DateTime",

12
packages/nocodb/src/services/columns.service.ts

@ -296,7 +296,7 @@ export class ColumnsService {
`Updating ${colBody.uidt} => ${colBody.uidt} is not implemented`, `Updating ${colBody.uidt} => ${colBody.uidt} is not implemented`,
); );
} else if ( } else if (
[UITypes.CreateTime, UITypes.LastModifiedTime].includes(colBody.uidt) [UITypes.CreatedTime, UITypes.LastModifiedTime].includes(colBody.uidt)
) { ) {
// allow updating of title only // allow updating of title only
await Column.update(param.columnId, { await Column.update(param.columnId, {
@ -1685,7 +1685,7 @@ export class ColumnsService {
}); });
break; break;
case UITypes.CreateTime: case UITypes.CreatedTime:
case UITypes.LastModifiedTime: case UITypes.LastModifiedTime:
{ {
let columnName: string; let columnName: string;
@ -1696,12 +1696,12 @@ export class ColumnsService {
(c) => c.uidt === colBody.uidt && c.system, (c) => c.uidt === colBody.uidt && c.system,
// || // ||
// c.column_name === // c.column_name ===
// (c.uidt === UITypes.CreateTime ? 'created_at' : 'updated_at'), // (c.uidt === UITypes.CreatedTime ? 'created_at' : 'updated_at'),
); );
if (!existingColumn) { if (!existingColumn) {
columnName = columnName =
colBody.uidt === UITypes.CreateTime ? 'created_at' : 'updated_at'; colBody.uidt === UITypes.CreatedTime ? 'created_at' : 'updated_at';
// const sqlClient = await reuseOrSave('sqlClient', reuse, async () => // const sqlClient = await reuseOrSave('sqlClient', reuse, async () =>
// NcConnectionMgrv2.getSqlClient(source), // NcConnectionMgrv2.getSqlClient(source),
// ); // );
@ -1751,7 +1751,7 @@ export class ColumnsService {
const title = getUniqueColumnAliasName( const title = getUniqueColumnAliasName(
table.columns, table.columns,
UITypes.CreateTime ? 'CreatedAt' : 'UpdatedAt', UITypes.CreatedTime ? 'CreatedAt' : 'UpdatedAt',
); );
await Column.insert({ await Column.insert({
@ -2209,7 +2209,7 @@ export class ColumnsService {
} }
// on delete create time or last modified time, keep the column in table and delete the column from meta // on delete create time or last modified time, keep the column in table and delete the column from meta
case UITypes.CreateTime: case UITypes.CreatedTime:
case UITypes.LastModifiedTime: case UITypes.LastModifiedTime:
{ {
if (column.system) { if (column.system) {

4
packages/nocodb/src/version-upgrader/ncXcdbCreatedAndUpdatedTimeUpgrader.ts

@ -6,7 +6,7 @@ import { MetaTable } from '~/utils/globals';
import { Column, Model } from '~/models'; import { Column, Model } from '~/models';
// An upgrader for upgrading created_at and updated_at columns // An upgrader for upgrading created_at and updated_at columns
// to system column and convert to new uidt CreateTime and LastModifiedTime // to system column and convert to new uidt CreatedTime and LastModifiedTime
const logger = new Logger('XcdbCreatedAndUpdatedTimeUpgrader'); const logger = new Logger('XcdbCreatedAndUpdatedTimeUpgrader');
@ -31,7 +31,7 @@ async function upgradeModels({
for (const column of columns) { for (const column of columns) {
if (column.column_name === 'created_at') { if (column.column_name === 'created_at') {
await Column.update(column.id, { await Column.update(column.id, {
uidt: UITypes.CreateTime, uidt: UITypes.CreatedTime,
system: true, system: true,
}); });
} }

Loading…
Cancel
Save