Skip to content
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

Conversation

Ari-suhyeon
Copy link
Contributor

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • DevOps process (non-breaking change which improves efficiency and reliability for CI/CD)
  • Documentation only

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?

  • definition data visible on web ui.

Checklist:

@Ari-suhyeon Ari-suhyeon added this to the v0.1.0 milestone Jan 22, 2024
@Ari-suhyeon Ari-suhyeon self-assigned this Jan 22, 2024
@Ari-suhyeon Ari-suhyeon linked an issue Jan 22, 2024 that may be closed by this pull request
@@ -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();
Copy link
Member

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");

@@ -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();
Copy link
Member

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");

@@ -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();
Copy link
Member

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 pueding merged commit a5051aa into main Jan 22, 2024
1 check passed
@pueding 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 join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Definition file not visible on web UI when connected to PostgreSQL
2 participants