fix: address critical AI review issues
All checks were successful
Test / rust-fmt-check (pull_request) Successful in 28s
Test / frontend-typecheck (pull_request) Successful in 1m29s
Test / frontend-tests (pull_request) Successful in 1m31s
PR Review Automation / review (pull_request) Successful in 3m28s
Test / rust-clippy (pull_request) Successful in 4m29s
Test / rust-tests (pull_request) Successful in 5m42s
All checks were successful
Test / rust-fmt-check (pull_request) Successful in 28s
Test / frontend-typecheck (pull_request) Successful in 1m29s
Test / frontend-tests (pull_request) Successful in 1m31s
PR Review Automation / review (pull_request) Successful in 3m28s
Test / rust-clippy (pull_request) Successful in 4m29s
Test / rust-tests (pull_request) Successful in 5m42s
- Fix linuxdeploy AppImage extraction using --appimage-extract - Remove 'has no column named' from duplicate column error handling - Use strftime instead of datetime for created_at default format
This commit is contained in:
parent
2d7aac8413
commit
8e1d43da43
@ -26,9 +26,12 @@ RUN apt-get update -qq \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install linuxdeploy for AppImage bundling (required for Tauri 2.x)
|
||||
# Download linuxdeploy from the official repository and extract AppImage
|
||||
RUN curl -fsSL -L https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage -o /usr/local/bin/linuxdeploy \
|
||||
&& chmod +x /usr/local/bin/linuxdeploy
|
||||
# Download linuxdeploy AppImage and extract to get the binary
|
||||
RUN curl -Ls https://github.com/tauri-apps/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage -o /tmp/linuxdeploy.AppImage \
|
||||
&& chmod +x /tmp/linuxdeploy.AppImage \
|
||||
&& /tmp/linuxdeploy.AppImage --appimage-extract \
|
||||
&& mv squashfs-root/usr/bin/linuxdeploy /usr/local/bin/ \
|
||||
&& rm -rf /tmp/linuxdeploy.AppImage squashfs-root
|
||||
|
||||
RUN rustup target add x86_64-unknown-linux-gnu \
|
||||
&& rustup component add rustfmt clippy
|
||||
|
||||
@ -197,7 +197,7 @@ pub fn run_migrations(conn: &Connection) -> anyhow::Result<()> {
|
||||
),
|
||||
(
|
||||
"016_add_created_at",
|
||||
"ALTER TABLE ai_providers ADD COLUMN created_at TEXT NOT NULL DEFAULT (datetime('now'))",
|
||||
"ALTER TABLE ai_providers ADD COLUMN created_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%d %H:%M:%S', 'now'))",
|
||||
),
|
||||
];
|
||||
|
||||
@ -218,12 +218,10 @@ pub fn run_migrations(conn: &Connection) -> anyhow::Result<()> {
|
||||
|| name.ends_with("_add_created_at")
|
||||
{
|
||||
// Use execute for ALTER TABLE (SQLite only allows one statement per command)
|
||||
// Skip error if column already exists
|
||||
// Skip error if column already exists (SQLITE_ERROR with "duplicate column name")
|
||||
if let Err(e) = conn.execute(sql, []) {
|
||||
let err_str = e.to_string();
|
||||
if err_str.contains("duplicate column name")
|
||||
|| err_str.contains("has no column named")
|
||||
{
|
||||
if err_str.contains("duplicate column name") {
|
||||
tracing::info!("Column may already exist, skipping migration {name}: {e}");
|
||||
} else {
|
||||
return Err(e.into());
|
||||
|
||||
Loading…
Reference in New Issue
Block a user