Skip to content

Commit

Permalink
fix(sql-backend): fix setval function call for postgreSQL backend in …
Browse files Browse the repository at this point in the history
…migration (#16306) (#16308)

Co-authored-by: August <[email protected]>
  • Loading branch information
github-actions[bot] and yezizp2012 authored Apr 15, 2024
1 parent f4abfe3 commit b78d43c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ctl/src/cmd_impl/meta/migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -816,14 +816,14 @@ pub async fn migrate(from: EtcdBackend, target: String, force_clean: bool) -> an
.conn
.execute(Statement::from_string(
DatabaseBackend::Postgres,
"SELECT setval('object_oid_seq', SELECT MAX(oid) FROM object);",
"SELECT setval('object_oid_seq', (SELECT MAX(oid) FROM object));",
))
.await?;
meta_store_sql
.conn
.execute(Statement::from_string(
DatabaseBackend::Postgres,
"SELECT setval('user_user_id_seq', SELECT MAX(user_id) FROM \"user\");",
"SELECT setval('user_user_id_seq', (SELECT MAX(user_id) FROM \"user\"));",
))
.await?;
}
Expand Down

0 comments on commit b78d43c

Please sign in to comment.