This repository has been archived by the owner on Nov 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Postgresql created_at, updated_at column data type changed. #231
Merged
pueding
merged 2 commits into
main
from
229-definition-file-not-visible-on-web-ui-when-connected-to-postgresql
Jan 22, 2024
Merged
Postgresql created_at, updated_at column data type changed. #231
pueding
merged 2 commits into
main
from
229-definition-file-not-visible-on-web-ui-when-connected-to-postgresql
Jan 22, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pueding
suggested changes
Jan 22, 2024
core/data-layer/src/data_layer.rs
Outdated
@@ -614,7 +614,7 @@ impl DataLayer { | |||
let metadata_string = serde_json::to_string(&scaling_component.metadata).unwrap(); | |||
let query_string = | |||
"UPDATE scaling_component SET id=$1, component_kind=$2, metadata=$3, enabled=$4, updated_at=$5 WHERE db_id=$6"; | |||
let updated_at = Utc::now(); | |||
let updated_at = Utc::now().format("%Y-%m-%d %H:%M:%S").to_string(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assert_eq!(dt.to_rfc3339_opts(SecondsFormat::Secs, true),
"2018-01-26T18:30:09Z");
core/data-layer/src/data_layer.rs
Outdated
@@ -643,21 +643,21 @@ impl DataLayer { | |||
let metatdata_string = serde_json::to_string(&plan.metadata).unwrap(); | |||
let query_string = "INSERT INTO plan (db_id, id, metadata, plans, enabled, created_at, updated_at) VALUES ($1,$2,$3,$4,$5,$6,$7) ON CONFLICT (id) DO UPDATE SET (metadata, plans, enabled, updated_at) = ($8, $9, $10, $11)"; | |||
let id = Uuid::new_v4().to_string(); | |||
let updated_at = Utc::now(); | |||
let updated_at = Utc::now().format("%Y-%m-%d %H:%M:%S").to_string(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assert_eq!(dt.to_rfc3339_opts(SecondsFormat::Secs, true),
"2018-01-26T18:30:09Z");
core/data-layer/src/data_layer.rs
Outdated
@@ -785,7 +785,7 @@ impl DataLayer { | |||
let metatdata_string = serde_json::to_string(&plan.metadata).unwrap(); | |||
let query_string = | |||
"UPDATE plan SET id=$1, metadata=$2, plans=$3, updated_at=$4, enabled=$5 WHERE db_id=$6"; | |||
let updated_at = Utc::now(); | |||
let updated_at = Utc::now().format("%Y-%m-%d %H:%M:%S").to_string(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assert_eq!(dt.to_rfc3339_opts(SecondsFormat::Secs, true),
"2018-01-26T18:30:09Z");
pueding
approved these changes
Jan 22, 2024
pueding
deleted the
229-definition-file-not-visible-on-web-ui-when-connected-to-postgresql
branch
January 22, 2024 09:08
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Types of changes
What this PR does / why we need it:
When connecting to PostgreSQL, the contents of the definition file are not displayed on the web UI screen.
Postgresql column type changed due to type mismatch error.
Which issue/s this PR fixes
fixes #229
How Has This Been Tested?
Checklist: