Browse Source

refactor: rename `CreateTime` to `CreatedTime`

pull/7304/head
Pranav C 12 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. 4
      packages/nc-gui/lang/ar.json
  7. 4
      packages/nc-gui/lang/bn_IN.json
  8. 4
      packages/nc-gui/lang/cs.json
  9. 4
      packages/nc-gui/lang/da.json
  10. 4
      packages/nc-gui/lang/de.json
  11. 4
      packages/nc-gui/lang/en.json
  12. 4
      packages/nc-gui/lang/es.json
  13. 4
      packages/nc-gui/lang/eu.json
  14. 4
      packages/nc-gui/lang/fa.json
  15. 4
      packages/nc-gui/lang/fi.json
  16. 4
      packages/nc-gui/lang/fr.json
  17. 4
      packages/nc-gui/lang/he.json
  18. 4
      packages/nc-gui/lang/hi.json
  19. 4
      packages/nc-gui/lang/hr.json
  20. 4
      packages/nc-gui/lang/id.json
  21. 4
      packages/nc-gui/lang/it.json
  22. 4
      packages/nc-gui/lang/ja.json
  23. 4
      packages/nc-gui/lang/ko.json
  24. 4
      packages/nc-gui/lang/lv.json
  25. 4
      packages/nc-gui/lang/nl.json
  26. 4
      packages/nc-gui/lang/no.json
  27. 4
      packages/nc-gui/lang/pl.json
  28. 4
      packages/nc-gui/lang/pt.json
  29. 4
      packages/nc-gui/lang/pt_BR.json
  30. 4
      packages/nc-gui/lang/ru.json
  31. 4
      packages/nc-gui/lang/sk.json
  32. 4
      packages/nc-gui/lang/sl.json
  33. 4
      packages/nc-gui/lang/sv.json
  34. 4
      packages/nc-gui/lang/th.json
  35. 4
      packages/nc-gui/lang/tr.json
  36. 4
      packages/nc-gui/lang/uk.json
  37. 4
      packages/nc-gui/lang/vi.json
  38. 4
      packages/nc-gui/lang/zh-Hans.json
  39. 4
      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
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()

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

@ -280,7 +280,7 @@ const onInsertAfter = () => {
const isDeleteAllowed = computed(() => {
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 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' }
case UITypes.Count:
return { icon: CountIcon, color: 'text-grey' }
case UITypes.CreateTime:
case UITypes.CreatedTime:
case UITypes.LastModifiedTime:
return { icon: iconMap.datetime, color: 'text-grey' }
}

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

@ -100,7 +100,7 @@ const uiTypeOptions = ref<Option[]>(
.filter(
(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],
),
)

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 `"`
// e.g. "2023-05-12T08:03:53.000Z" -> 2023-05-12T08:03:53.000Z
textToCopy = textToCopy.replace(/["']/g, '')

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

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

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

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

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

@ -273,7 +273,7 @@
"Count": "Počet",
"Lookup": "Vyhledávání",
"DateTime": "Datum a čas",
"CreateTime": "Vytvořit čas",
"CreatedTime": "Vytvořit čas",
"LastModifiedTime": "Čas poslední úpravy",
"AutoNumber": "Automatické číslo",
"Barcode": "Čárový kód",
@ -1347,4 +1347,4 @@
"roleUpdated": "Role byla úspěšně aktualizována"
}
}
}
}

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

@ -273,7 +273,7 @@
"Count": "Tælle",
"Lookup": "Kig op",
"DateTime": "Dato tid",
"CreateTime": "Opret tid",
"CreatedTime": "Opret tid",
"LastModifiedTime": "Sidste ændret tid",
"AutoNumber": "Auto nummer.",
"Barcode": "Stregkode.",
@ -1347,4 +1347,4 @@
"roleUpdated": "Rolle opdateret med succes"
}
}
}
}

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

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

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

@ -273,7 +273,7 @@
"Count": "Count",
"Lookup": "Lookup",
"DateTime": "Date Time",
"CreateTime": "Create Time",
"CreatedTime": "Create Time",
"LastModifiedTime": "Last Modified Time",
"AutoNumber": "Auto Number",
"Barcode": "Barcode",
@ -1347,4 +1347,4 @@
"roleUpdated": "Role updated successfully"
}
}
}
}

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

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

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

@ -273,7 +273,7 @@
"Count": "Count",
"Lookup": "Lookup",
"DateTime": "Date Time",
"CreateTime": "Create Time",
"CreatedTime": "Create Time",
"LastModifiedTime": "Azkeneko aldatze ordua",
"AutoNumber": "Auto Number",
"Barcode": "Barcode",
@ -1347,4 +1347,4 @@
"roleUpdated": "Role updated successfully"
}
}
}
}

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

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

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

@ -273,7 +273,7 @@
"Count": "Kreivi",
"Lookup": "Katso ylös",
"DateTime": "Treffiaika",
"CreateTime": "Luoda aikaa",
"CreatedTime": "Luoda aikaa",
"LastModifiedTime": "Viimeksi muutettu aika",
"AutoNumber": "Automaattinen numero",
"Barcode": "Viivakoodi",
@ -1347,4 +1347,4 @@
"roleUpdated": "Rooli päivitetty onnistuneesti"
}
}
}
}

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

@ -273,7 +273,7 @@
"Count": "Compteur",
"Lookup": "Consulter",
"DateTime": "Date et heure",
"CreateTime": "Date de création",
"CreatedTime": "Date de création",
"LastModifiedTime": "Dernière modification",
"AutoNumber": "Numérotation automatique",
"Barcode": "Code-barres",
@ -1347,4 +1347,4 @@
"roleUpdated": "Rôle mis à jour avec succès"
}
}
}
}

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

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

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

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

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

@ -273,7 +273,7 @@
"Count": "Računati",
"Lookup": "Pogledaj",
"DateTime": "Datum vrijeme",
"CreateTime": "Stvoriti vrijeme",
"CreatedTime": "Stvoriti vrijeme",
"LastModifiedTime": "Posljednje izmijenjeno vrijeme",
"AutoNumber": "Automatski broj",
"Barcode": "Barkod",
@ -1347,4 +1347,4 @@
"roleUpdated": "Uloga je uspješno aktualizirana"
}
}
}
}

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

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

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

@ -273,7 +273,7 @@
"Count": "Contatore",
"Lookup": "Consultazione",
"DateTime": "Data e ora",
"CreateTime": "Data di creazione",
"CreatedTime": "Data di creazione",
"LastModifiedTime": "Data di ultima modifica",
"AutoNumber": "Numerazione automatica",
"Barcode": "Codice a barre",
@ -1347,4 +1347,4 @@
"roleUpdated": "Ruolo aggiornato con successo"
}
}
}
}

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

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

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

@ -273,7 +273,7 @@
"Count": "카운트",
"Lookup": "조회",
"DateTime": "일시",
"CreateTime": "생성시간",
"CreatedTime": "생성시간",
"LastModifiedTime": "최종수정시간",
"AutoNumber": "자동번호",
"Barcode": "바코드",
@ -1347,4 +1347,4 @@
"roleUpdated": "역할이 성공적으로 업데이트되었습니다."
}
}
}
}

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

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

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

@ -273,7 +273,7 @@
"Count": "Telling",
"Lookup": "Zoekopdracht",
"DateTime": "Tijdstip",
"CreateTime": "Maak Tijd",
"CreatedTime": "Maak Tijd",
"LastModifiedTime": "Laatst gewijzigd",
"AutoNumber": "Automatische nummering",
"Barcode": "Barcode",
@ -1347,4 +1347,4 @@
"roleUpdated": "Rol succesvol bijgewerkt"
}
}
}
}

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

@ -273,7 +273,7 @@
"Count": "Telle",
"Lookup": "Se opp",
"DateTime": "Dato tid",
"CreateTime": "Skape tid",
"CreatedTime": "Skape tid",
"LastModifiedTime": "Sist endret tid",
"AutoNumber": "Auto nummer",
"Barcode": "Strekkode",
@ -1347,4 +1347,4 @@
"roleUpdated": "Role updated successfully"
}
}
}
}

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

@ -273,7 +273,7 @@
"Count": "Licznik",
"Lookup": "Wyszukiwanie",
"DateTime": "Data i czas",
"CreateTime": "Data utworzenia",
"CreatedTime": "Data utworzenia",
"LastModifiedTime": "Data ostatniej modyfikacji",
"AutoNumber": "Automatyczny numer",
"Barcode": "Kod kreskowy",
@ -1347,4 +1347,4 @@
"roleUpdated": "Rola została pomyślnie zaktualizowana"
}
}
}
}

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

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

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

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

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

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

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

@ -273,7 +273,7 @@
"Count": "Počítajte",
"Lookup": "Vyhľadávanie",
"DateTime": "Dátum Čas",
"CreateTime": "Vytvoriť čas",
"CreatedTime": "Vytvoriť čas",
"LastModifiedTime": "Čas poslednej úpravy",
"AutoNumber": "Automatické číslo",
"Barcode": "Čiarový kód",
@ -1347,4 +1347,4 @@
"roleUpdated": "Úloha bola úspešne aktualizovaná"
}
}
}
}

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

@ -273,7 +273,7 @@
"Count": "Count.",
"Lookup": "Poglej gor",
"DateTime": "Datum čas",
"CreateTime": "Ustvarite čas",
"CreatedTime": "Ustvarite čas",
"LastModifiedTime": "Zadnji spremenjen čas",
"AutoNumber": "Samodejna številka",
"Barcode": "Črtna koda",
@ -1347,4 +1347,4 @@
"roleUpdated": "Vloga je bila uspešno posodobljena"
}
}
}
}

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

@ -273,7 +273,7 @@
"Count": "Räkna",
"Lookup": "Slå upp",
"DateTime": "Datum Tid",
"CreateTime": "Skapa tid",
"CreatedTime": "Skapa tid",
"LastModifiedTime": "Senast ändrad tid",
"AutoNumber": "Automatisk nummer",
"Barcode": "Streckkod",
@ -1347,4 +1347,4 @@
"roleUpdated": "Rollen har uppdaterats framgångsrikt"
}
}
}
}

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

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

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

@ -273,7 +273,7 @@
"Count": "Say",
"Lookup": "Referans",
"DateTime": "Tarih saat",
"CreateTime": "Oluşturma zamanı",
"CreatedTime": "Oluşturma zamanı",
"LastModifiedTime": "Son değiştirilme",
"AutoNumber": "Otomatik Sayı",
"Barcode": "Barkod",
@ -1347,4 +1347,4 @@
"roleUpdated": "Rol başarıyla güncellendi"
}
}
}
}

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

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

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

@ -273,7 +273,7 @@
"Count": "Đếm",
"Lookup": "Tra cứu",
"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",
"AutoNumber": "Số tự động",
"Barcode": "Mã vạch.",
@ -1347,4 +1347,4 @@
"roleUpdated": "Role updated successfully"
}
}
}
}

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

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

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

@ -273,7 +273,7 @@
"Count": "計數",
"Lookup": "查閱",
"DateTime": "日期時間",
"CreateTime": "創建時間",
"CreatedTime": "創建時間",
"LastModifiedTime": "最後修改時間",
"AutoNumber": "自動編號",
"Barcode": "條碼",
@ -1347,4 +1347,4 @@
"roleUpdated": "角色已成功更新"
}
}
}
}

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

@ -139,7 +139,7 @@ const uiTypes = [
icon: iconMap.account,
},
{
name: UITypes.CreateTime,
name: UITypes.CreatedTime,
icon: iconMap.clock,
},
{
@ -153,7 +153,7 @@ const getUIDTIcon = (uidt: UITypes | string) => {
[
...uiTypes,
{
name: UITypes.CreateTime,
name: UITypes.CreatedTime,
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.Date:
case UITypes.DateTime:
case UITypes.CreateTime:
case UITypes.CreatedTime:
case UITypes.LastModifiedTime:
return [
{ text: '1 → 9', value: 'asc' },

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -638,7 +638,7 @@ async function _formulaQueryBuilder(
};
};
break;
case UITypes.CreateTime:
case UITypes.CreatedTime:
case UITypes.LastModifiedTime:
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
// 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 (
column: Column,
columns?: Column[],
) => {
if (
!([UITypes.CreateTime, UITypes.LastModifiedTime] as UITypes[]).includes(
!([UITypes.CreatedTime, UITypes.LastModifiedTime] as UITypes[]).includes(
column.uidt,
)
)

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

@ -39,7 +39,7 @@ export default async function getColumnPropsFromUIDT(
const finalColumnMeta = { ...newColumn, ...column };
if (finalColumnMeta.uidt === UITypes.CreateTime) {
if (finalColumnMeta.uidt === UITypes.CreatedTime) {
finalColumnMeta.column_name = 'created_at';
} else if (finalColumnMeta.uidt === UITypes.LastModifiedTime) {
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();
}
break;
case UITypes.CreateTime:
case UITypes.CreatedTime:
{
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 currency & percent, duration are marked as number
// types createTime & modifiedTime are marked as formula
// types CreatedTime & modifiedTime are marked as formula
switch (col.type) {
case 'text':
@ -1437,7 +1437,7 @@ export class AtImportProcessor {
break;
case UITypes.DateTime:
case UITypes.CreateTime:
case UITypes.CreatedTime:
case UITypes.LastModifiedTime:
rec[key] = dayjs(value).format('YYYY-MM-DD HH:mm');
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.Formula ||
a.uidt === UITypes.QrCode ||
a.uidt === UITypes.CreateTime ||
a.uidt === UITypes.CreatedTime ||
a.uidt === UITypes.LastModifiedTime ||
a.uidt === UITypes.Barcode,
),
@ -895,7 +895,7 @@ export class ImportService {
}
}
} else if (
col.uidt === UITypes.CreateTime ||
col.uidt === UITypes.CreatedTime ||
col.uidt === UITypes.LastModifiedTime
) {
const freshModelData = await this.columnsService.columnAdd({

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

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

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

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

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

@ -296,7 +296,7 @@ export class ColumnsService {
`Updating ${colBody.uidt} => ${colBody.uidt} is not implemented`,
);
} else if (
[UITypes.CreateTime, UITypes.LastModifiedTime].includes(colBody.uidt)
[UITypes.CreatedTime, UITypes.LastModifiedTime].includes(colBody.uidt)
) {
// allow updating of title only
await Column.update(param.columnId, {
@ -1685,7 +1685,7 @@ export class ColumnsService {
});
break;
case UITypes.CreateTime:
case UITypes.CreatedTime:
case UITypes.LastModifiedTime:
{
let columnName: string;
@ -1696,12 +1696,12 @@ export class ColumnsService {
(c) => c.uidt === colBody.uidt && c.system,
// ||
// c.column_name ===
// (c.uidt === UITypes.CreateTime ? 'created_at' : 'updated_at'),
// (c.uidt === UITypes.CreatedTime ? 'created_at' : 'updated_at'),
);
if (!existingColumn) {
columnName =
colBody.uidt === UITypes.CreateTime ? 'created_at' : 'updated_at';
colBody.uidt === UITypes.CreatedTime ? 'created_at' : 'updated_at';
// const sqlClient = await reuseOrSave('sqlClient', reuse, async () =>
// NcConnectionMgrv2.getSqlClient(source),
// );
@ -1751,7 +1751,7 @@ export class ColumnsService {
const title = getUniqueColumnAliasName(
table.columns,
UITypes.CreateTime ? 'CreatedAt' : 'UpdatedAt',
UITypes.CreatedTime ? 'CreatedAt' : 'UpdatedAt',
);
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
case UITypes.CreateTime:
case UITypes.CreatedTime:
case UITypes.LastModifiedTime:
{
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';
// 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');
@ -31,7 +31,7 @@ async function upgradeModels({
for (const column of columns) {
if (column.column_name === 'created_at') {
await Column.update(column.id, {
uidt: UITypes.CreateTime,
uidt: UITypes.CreatedTime,
system: true,
});
}

Loading…
Cancel
Save