Skip to content

Commit e169b67

Browse files
committed
Update to match new shema
1 parent 29c9024 commit e169b67

4 files changed

Lines changed: 13 additions & 6 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "openworkers-runner"
3-
version = "0.6.4"
3+
version = "0.6.5"
44
edition = "2024"
55
default-run = "openworkers-runner"
66

src/ops.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ impl OperationsHandler for RunnerOperations {
543543
match op {
544544
DatabaseOp::Query { sql, params } => {
545545
log::debug!(
546-
"[ops] database {} ({}) query: {} (params: {:?})",
546+
"[ops] database {} ({:?}) query: {} (params: {:?})",
547547
binding_name,
548548
config.provider,
549549
sql,

src/store.rs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ pub enum BindingType {
2525
Database,
2626
}
2727

28+
#[derive(Clone, Debug, PartialEq, sqlx::Type)]
29+
#[sqlx(type_name = "enum_database_provider", rename_all = "lowercase")]
30+
pub enum DatabaseProvider {
31+
Platform,
32+
Postgres,
33+
}
34+
2835
/// Assets binding config (static file serving from S3/R2)
2936
#[derive(Clone, Debug)]
3037
pub struct AssetsConfig {
@@ -61,8 +68,8 @@ pub struct KvConfig {
6168
pub struct DatabaseConfig {
6269
pub id: String,
6370
pub name: String,
64-
/// Provider: 'platform' (shared multi-tenant) or 'postgres' (direct connection)
65-
pub provider: String,
71+
/// Provider: platform (shared multi-tenant) or postgres (direct connection)
72+
pub provider: DatabaseProvider,
6673
/// Connection string (for postgres provider)
6774
pub connection_string: Option<String>,
6875
/// Schema name (for platform provider - multi-tenant on shared pool)
@@ -519,7 +526,7 @@ async fn fetch_database_config(
519526
struct Row {
520527
id: String,
521528
name: String,
522-
provider: String,
529+
provider: DatabaseProvider,
523530
connection_string: Option<String>,
524531
schema_name: Option<String>,
525532
max_rows: i32,

0 commit comments

Comments
 (0)