account is always FK from now on

This commit is contained in:
Priec
2026-07-29 15:26:33 +02:00
parent 76a5f76194
commit a02aba3832
6 changed files with 12 additions and 2 deletions

2
client

Submodule client updated: 8605da5f48...4a6fba395a

View File

@@ -55,6 +55,10 @@ message TableLink {
// Otherwise the column allows NULL. // Otherwise the column allows NULL.
// Duplicate links to the same target table in one request are rejected. // Duplicate links to the same target table in one request are rejected.
bool required = 2; bool required = 2;
// User-defined column read from this linked row as the journal account.
// Exactly one required link must set this when the table contains ACCOUNTING.
string account_value_column = 3;
} }
// Defines the input for creating a new table definition. // Defines the input for creating a new table definition.

Binary file not shown.

View File

@@ -13,6 +13,10 @@ pub struct TableLink {
/// Duplicate links to the same target table in one request are rejected. /// Duplicate links to the same target table in one request are rejected.
#[prost(bool, tag = "2")] #[prost(bool, tag = "2")]
pub required: bool, pub required: bool,
/// User-defined column read from this linked row as the journal account.
/// Exactly one required link must set this when the table contains ACCOUNTING.
#[prost(string, tag = "3")]
pub account_value_column: ::prost::alloc::string::String,
} }
/// Defines the input for creating a new table definition. /// Defines the input for creating a new table definition.
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]

View File

@@ -93,6 +93,7 @@ impl CreateTableForm {
.map(|linked_table_name| TableLink { .map(|linked_table_name| TableLink {
linked_table_name, linked_table_name,
required: true, required: true,
account_value_column: String::new(),
}) })
.collect::<Vec<_>>(); .collect::<Vec<_>>();
links.extend( links.extend(
@@ -101,6 +102,7 @@ impl CreateTableForm {
.map(|linked_table_name| TableLink { .map(|linked_table_name| TableLink {
linked_table_name, linked_table_name,
required: false, required: false,
account_value_column: String::new(),
}), }),
); );

2
server

Submodule server updated: 01ce5a63b7...2b4dfbf8ff