Commit
•
745fdb9
1
Parent(s):
9aeba4b
chore: Add timestamps to code_feedbacks and code_vectors tables
Browse files
lib/medical_transcription/coding/code_vector.ex
CHANGED
@@ -9,6 +9,8 @@ defmodule MedicalTranscription.Coding.CodeVector do
|
|
9 |
field :code, :string
|
10 |
field :description, :string
|
11 |
field :description_vector, Pgvector.Ecto.Vector
|
|
|
|
|
12 |
end
|
13 |
|
14 |
def changeset(code_vector, params \\ %{}) do
|
|
|
9 |
field :code, :string
|
10 |
field :description, :string
|
11 |
field :description_vector, Pgvector.Ecto.Vector
|
12 |
+
|
13 |
+
timestamps()
|
14 |
end
|
15 |
|
16 |
def changeset(code_vector, params \\ %{}) do
|
lib/medical_transcription/feedback/code_feedback.ex
CHANGED
@@ -10,6 +10,8 @@ defmodule MedicalTranscription.Feedback.CodeFeedback do
|
|
10 |
field :response, :boolean
|
11 |
|
12 |
belongs_to :code_vector, MedicalTranscription.CodeVector
|
|
|
|
|
13 |
end
|
14 |
|
15 |
def changeset(code_feedback, params \\ %{}) do
|
|
|
10 |
field :response, :boolean
|
11 |
|
12 |
belongs_to :code_vector, MedicalTranscription.CodeVector
|
13 |
+
|
14 |
+
timestamps()
|
15 |
end
|
16 |
|
17 |
def changeset(code_feedback, params \\ %{}) do
|
priv/repo/migrations/20240130154023_add_timestamps_to_tables.exs
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
defmodule MedicalTranscription.Repo.Migrations.AddTimestampsToTables do
|
2 |
+
use Ecto.Migration
|
3 |
+
|
4 |
+
def change do
|
5 |
+
alter table("code_feedbacks") do
|
6 |
+
timestamps(default: fragment("now()"))
|
7 |
+
end
|
8 |
+
|
9 |
+
alter table("code_vectors") do
|
10 |
+
timestamps(default: fragment("now()"))
|
11 |
+
end
|
12 |
+
end
|
13 |
+
end
|