Fix workspace migration failure (#36911)
This fixes a regression on nightly introduced in https://github.com/zed-industries/zed/pull/36714 Release Notes: - N/A
This commit is contained in:
parent
f8667a8379
commit
d43df9e841
16 changed files with 582 additions and 495 deletions
|
@ -9,7 +9,11 @@ use std::path::{Path, PathBuf};
|
|||
use ui::{App, Context, Pixels, Window};
|
||||
use util::ResultExt as _;
|
||||
|
||||
use db::{define_connection, query, sqlez::statement::Statement, sqlez_macros::sql};
|
||||
use db::{
|
||||
query,
|
||||
sqlez::{domain::Domain, statement::Statement, thread_safe_connection::ThreadSafeConnection},
|
||||
sqlez_macros::sql,
|
||||
};
|
||||
use workspace::{
|
||||
ItemHandle, ItemId, Member, Pane, PaneAxis, PaneGroup, SerializableItem as _, Workspace,
|
||||
WorkspaceDb, WorkspaceId,
|
||||
|
@ -375,9 +379,13 @@ impl<'de> Deserialize<'de> for SerializedAxis {
|
|||
}
|
||||
}
|
||||
|
||||
define_connection! {
|
||||
pub static ref TERMINAL_DB: TerminalDb<WorkspaceDb> =
|
||||
&[sql!(
|
||||
pub struct TerminalDb(ThreadSafeConnection);
|
||||
|
||||
impl Domain for TerminalDb {
|
||||
const NAME: &str = stringify!(TerminalDb);
|
||||
|
||||
const MIGRATIONS: &[&str] = &[
|
||||
sql!(
|
||||
CREATE TABLE terminals (
|
||||
workspace_id INTEGER,
|
||||
item_id INTEGER UNIQUE,
|
||||
|
@ -414,6 +422,8 @@ define_connection! {
|
|||
];
|
||||
}
|
||||
|
||||
db::static_connection!(TERMINAL_DB, TerminalDb, [WorkspaceDb]);
|
||||
|
||||
impl TerminalDb {
|
||||
query! {
|
||||
pub async fn update_workspace_id(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue