Skip to content

Commit f5a679d

Browse files
committed
Update sqlx dependencies to use a new commit hash and modify Snowflake table creation syntax in filesystem.rs
1 parent e44b5e8 commit f5a679d

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

Cargo.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/filesystem.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ impl DbFsQueries {
216216
match dbms {
217217
SupportedDatabase::Mssql => "CREATE TABLE sqlpage_files(path NVARCHAR(255) NOT NULL PRIMARY KEY, contents VARBINARY(MAX), last_modified DATETIME2(3) NOT NULL DEFAULT CURRENT_TIMESTAMP);",
218218
SupportedDatabase::Postgres => "CREATE TABLE IF NOT EXISTS sqlpage_files(path VARCHAR(255) NOT NULL PRIMARY KEY, contents BYTEA, last_modified TIMESTAMP DEFAULT CURRENT_TIMESTAMP);",
219-
SupportedDatabase::Snowflake => "CREATE TABLE IF NOT EXISTS sqlpage_files(path VARCHAR(255) NOT NULL PRIMARY KEY, contents VARBINARY, last_modified TIMESTAMP DEFAULT CURRENT_TIMESTAMP);",
219+
SupportedDatabase::Snowflake => "CREATE TABLE IF NOT EXISTS sqlpage_files(path VARCHAR(255) NOT NULL PRIMARY KEY, contents VARBINARY, last_modified TIMESTAMP_TZ DEFAULT CONVERT_TIMEZONE('UTC', CURRENT_TIMESTAMP()));",
220220
_ => "CREATE TABLE IF NOT EXISTS sqlpage_files(path VARCHAR(255) NOT NULL PRIMARY KEY, contents BLOB, last_modified TIMESTAMP DEFAULT CURRENT_TIMESTAMP);",
221221
}
222222
}
@@ -381,6 +381,7 @@ async fn test_sql_file_read_utf8() -> anyhow::Result<()> {
381381
let was_modified = fs
382382
.modified_since(&state, "unit test file.txt".as_ref(), one_hour_ago, false)
383383
.await?;
384+
384385
assert!(was_modified, "File should be modified since one hour ago");
385386

386387
let was_modified = fs

0 commit comments

Comments
 (0)