-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Postgresql created_at, updated_at column data type changed. #231
Postgresql created_at, updated_at column data type changed. #231
Conversation
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");
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: