Skip to content
Snippets Groups Projects
Commit dcf76b11 authored by Ryan Senior's avatar Ryan Senior
Browse files

Added auditing columns to the dimensions table

parent a881fca4
No related branches found
No related tags found
No related merge requests found
......@@ -3717,6 +3717,18 @@ databaseChangeLog:
initiallyDeferred: false
nullable: true
references: metabase_field(id)
- column:
name: created_at
type: DATETIME
remarks: 'The timestamp of when the dimension was created.'
constraints:
nullable: false
- column:
name: updated_at
type: DATETIME
remarks: 'The timestamp of when these dimension was last updated.'
constraints:
nullable: false
- addUniqueConstraint:
tableName: dimensions
columnNames: field_id, name
......
......@@ -12,4 +12,5 @@
(u/strict-extend (class Dimensions)
models/IModel
(merge models/IModelDefaults
{:types (constantly {:type :keyword})}))
{:types (constantly {:type :keyword})
:properties (constantly {:timestamped? true})}))
......@@ -545,7 +545,7 @@
(select-keys [:id :table_id :name :values :dimensions])
(update :dimensions (fn [dim]
(if (map? dim)
(dissoc dim :id)
(dissoc dim :id :created_at :updated_at)
dim))))))
;; ## GET /api/table/:id/query_metadata
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment