Skip to content

Commit e21b5ee

Browse files
committed
Fix merge conflicts
2 parents e298b0d + a44447d commit e21b5ee

File tree

28 files changed

+736
-102
lines changed

28 files changed

+736
-102
lines changed

.changes/v0.30.2.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
## v0.30.2 (2025-07-31)
2+
3+
### Notice
4+
5+
* This is a patch release, please also check [the full release note](https://github.com/TabbyML/tabby/releases/tag/v0.30.0) for 0.30.
6+
7+
### Fixed and Improvements
8+
9+
* Use 0.7.3 sqlx to avoid database pool timeout. [#4328](https://github.com/TabbyML/tabby/pull/4328)
10+
* Bump llama.cpp to b6047. [#4330](https://github.com/TabbyML/tabby/pull/4330)
11+
* Expose the Flash Attention LLAMA flag as an environment variable. [#4323](https://github.com/TabbyML/tabby/pull/4323)

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,18 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
66
and is generated by [Changie](https://github.com/miniscruff/changie).
77

8+
## v0.30.2 (2025-07-31)
9+
10+
### Notice
11+
12+
* This is a patch release, please also check [the full release note](https://github.com/TabbyML/tabby/releases/tag/v0.30.0) for 0.30.
13+
14+
### Fixed and Improvements
15+
16+
* Use 0.7.3 sqlx to avoid database pool timeout. [#4328](https://github.com/TabbyML/tabby/pull/4328)
17+
* Bump llama.cpp to b6047. [#4330](https://github.com/TabbyML/tabby/pull/4330)
18+
* Expose the Flash Attention LLAMA flag as an environment variable. [#4323](https://github.com/TabbyML/tabby/pull/4323)
19+
820
## v0.30.1 (2025-07-16)
921

1022
### Notice
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ALTER TABLE server_setting DROP COLUMN branding_logo;
2+
ALTER TABLE server_setting DROP COLUMN branding_icon;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ALTER TABLE server_setting ADD COLUMN branding_logo TEXT DEFAULT NULL;
2+
ALTER TABLE server_setting ADD COLUMN branding_icon TEXT DEFAULT NULL;
File renamed without changes.
File renamed without changes.

ee/tabby-db/schema.sqlite

0 Bytes
Binary file not shown.

ee/tabby-db/schema/schema.sql

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ CREATE TABLE server_setting(
6464
network_external_url STRING NOT NULL DEFAULT 'http://localhost:8080'
6565
,
6666
billing_enterprise_license STRING,
67-
security_disable_password_login BOOLEAN NOT NULL DEFAULT FALSE
67+
security_disable_password_login BOOLEAN NOT NULL DEFAULT FALSE,
68+
branding_logo TEXT DEFAULT NULL,
69+
branding_icon TEXT DEFAULT NULL
6870
);
6971
CREATE TABLE email_setting(
7072
id INTEGER PRIMARY KEY AUTOINCREMENT,
@@ -259,27 +261,29 @@ CREATE TABLE ldap_credential(
259261
created_at TIMESTAMP NOT NULL DEFAULT(DATETIME('now')),
260262
updated_at TIMESTAMP NOT NULL DEFAULT(DATETIME('now'))
261263
);
262-
CREATE TABLE IF NOT EXISTS "pages"(
263-
id integer PRIMARY KEY AUTOINCREMENT NOT NULL,
264-
author_id integer NOT NULL,
265-
title text,
266-
content text,
267-
created_at timestamp NOT NULL DEFAULT(DATETIME('now')),
268-
updated_at timestamp NOT NULL DEFAULT(DATETIME('now')),
264+
CREATE TABLE pages(
265+
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
266+
-- The user who created the page
267+
author_id INTEGER NOT NULL,
268+
title TEXT,
269+
content TEXT,
270+
created_at TIMESTAMP NOT NULL DEFAULT(DATETIME('now')),
271+
updated_at TIMESTAMP NOT NULL DEFAULT(DATETIME('now')),
269272
code_source_id VARCHAR(255),
270-
FOREIGN KEY(author_id) REFERENCES "users"(id) ON DELETE CASCADE
273+
FOREIGN KEY(author_id) REFERENCES users(id) ON DELETE CASCADE
271274
);
272-
CREATE TABLE IF NOT EXISTS "page_sections"(
273-
id integer PRIMARY KEY AUTOINCREMENT NOT NULL,
274-
page_id integer NOT NULL,
275-
title text NOT NULL,
276-
content text,
277-
"position" integer NOT NULL,
278-
created_at timestamp NOT NULL DEFAULT(DATETIME('now')),
279-
updated_at timestamp NOT NULL DEFAULT(DATETIME('now')),
275+
CREATE TABLE page_sections(
276+
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
277+
page_id INTEGER NOT NULL,
278+
title TEXT NOT NULL,
279+
content TEXT,
280+
position INTEGER NOT NULL,
281+
created_at TIMESTAMP NOT NULL DEFAULT(DATETIME('now')),
282+
updated_at TIMESTAMP NOT NULL DEFAULT(DATETIME('now')),
280283
attachment BLOB NOT NULL DEFAULT '{}',
281-
FOREIGN KEY(page_id) REFERENCES "pages"(id) ON DELETE CASCADE,
282-
UNIQUE(page_id, "position")
284+
--- Ensure that the position is unique for each page
285+
CONSTRAINT `unique_page_id_position` UNIQUE(page_id, position),
286+
FOREIGN KEY(page_id) REFERENCES pages(id) ON DELETE CASCADE
283287
);
284288
CREATE TABLE ingested_documents(
285289
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,

ee/tabby-db/schema/schema.svg

Lines changed: 55 additions & 47 deletions
Loading

ee/tabby-db/src/server_setting.rs

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ pub struct ServerSettingDAO {
1010
pub security_disable_client_side_telemetry: bool,
1111
pub security_disable_password_login: bool,
1212
pub network_external_url: String,
13+
pub branding_logo: Option<String>,
14+
pub branding_icon: Option<String>,
1315
}
1416

1517
const SERVER_SETTING_ROW_ID: i32 = 1;
@@ -35,7 +37,9 @@ impl DbConn {
3537
network_external_url,
3638
security_allowed_register_domain_list,
3739
billing_enterprise_license,
38-
security_disable_password_login
40+
security_disable_password_login,
41+
branding_logo,
42+
branding_icon
3943
FROM server_setting
4044
WHERE id = ?;",
4145
)
@@ -106,6 +110,23 @@ impl DbConn {
106110
Ok(())
107111
}
108112

113+
pub async fn update_branding_setting(
114+
&self,
115+
branding_logo: Option<String>,
116+
branding_icon: Option<String>,
117+
) -> Result<()> {
118+
sqlx::query!(
119+
"UPDATE server_setting SET branding_logo = ?, branding_icon = ? WHERE id = ?",
120+
branding_logo,
121+
branding_icon,
122+
SERVER_SETTING_ROW_ID
123+
)
124+
.execute(&self.pool)
125+
.await?;
126+
127+
Ok(())
128+
}
129+
109130
pub async fn read_enterprise_license(&self) -> Result<Option<String>> {
110131
Ok(sqlx::query_scalar(
111132
"SELECT billing_enterprise_license FROM server_setting WHERE id = ?;",
@@ -142,6 +163,8 @@ mod tests {
142163
security_disable_client_side_telemetry: false,
143164
security_disable_password_login: false,
144165
network_external_url: "http://localhost:8080".into(),
166+
branding_logo: None,
167+
branding_icon: None,
145168
}
146169
}
147170
#[test]

0 commit comments

Comments
 (0)