Skip to content

Commit 246242b

Browse files
committed
Fix postgres files table creation
1 parent fcb33d4 commit 246242b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/filesystem.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ impl DbFsQueries {
149149
fn get_create_table_sql(db_kind: AnyKind) -> &'static str {
150150
match db_kind {
151151
AnyKind::Mssql => "CREATE TABLE sqlpage_files(path NVARCHAR(255) NOT NULL PRIMARY KEY, contents VARBINARY(MAX), last_modified DATETIME2(3) NOT NULL DEFAULT CURRENT_TIMESTAMP);",
152+
AnyKind::Postgres => "CREATE TABLE IF NOT EXISTS sqlpage_files(path VARCHAR(255) NOT NULL PRIMARY KEY, contents BYTEA, last_modified TIMESTAMP DEFAULT CURRENT_TIMESTAMP);",
152153
_ => "CREATE TABLE IF NOT EXISTS sqlpage_files(path VARCHAR(255) NOT NULL PRIMARY KEY, contents BLOB, last_modified TIMESTAMP DEFAULT CURRENT_TIMESTAMP);",
153154
}
154155
}

0 commit comments

Comments
 (0)