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

- 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:
Shaun Arman 2026-04-13 08:50:34 -05:00
parent 2d7aac8413
commit 8e1d43da43
2 changed files with 9 additions and 8 deletions

View File

@ -26,9 +26,12 @@ RUN apt-get update -qq \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
# Install linuxdeploy for AppImage bundling (required for Tauri 2.x) # Install linuxdeploy for AppImage bundling (required for Tauri 2.x)
# Download linuxdeploy from the official repository and extract AppImage # Download linuxdeploy AppImage and extract to get the binary
RUN curl -fsSL -L https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage -o /usr/local/bin/linuxdeploy \ RUN curl -Ls https://github.com/tauri-apps/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage -o /tmp/linuxdeploy.AppImage \
&& chmod +x /usr/local/bin/linuxdeploy && 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 \ RUN rustup target add x86_64-unknown-linux-gnu \
&& rustup component add rustfmt clippy && rustup component add rustfmt clippy

View File

@ -197,7 +197,7 @@ pub fn run_migrations(conn: &Connection) -> anyhow::Result<()> {
), ),
( (
"016_add_created_at", "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") || name.ends_with("_add_created_at")
{ {
// Use execute for ALTER TABLE (SQLite only allows one statement per command) // 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, []) { if let Err(e) = conn.execute(sql, []) {
let err_str = e.to_string(); let err_str = e.to_string();
if err_str.contains("duplicate column name") if err_str.contains("duplicate column name") {
|| err_str.contains("has no column named")
{
tracing::info!("Column may already exist, skipping migration {name}: {e}"); tracing::info!("Column may already exist, skipping migration {name}: {e}");
} else { } else {
return Err(e.into()); return Err(e.into());