account table is being automatic from now on

This commit is contained in:
Priec
2026-07-29 16:45:38 +02:00
parent a02aba3832
commit f7121e6cf1
6 changed files with 6 additions and 18 deletions

2
client

Submodule client updated: 4a6fba395a...9f68031ff4

View File

@@ -55,10 +55,6 @@ 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.
@@ -183,9 +179,8 @@ message ColumnDefinition {
// TIME (timezone-free time of day) // TIME (timezone-free time of day)
// MONEY (= unconstrained NUMERIC; currency comes from the table) // MONEY (= unconstrained NUMERIC; currency comes from the table)
// ACCOUNTING (creates schema-managed name, debit, and credit columns; // ACCOUNTING (creates schema-managed name, debit, and credit columns;
// the table creator must separately provide a column named account // automatically creates a required accounts_id link and posts
// with any supported type or a required link to a table named account; // the referenced canonical account row's account value;
// linked accounts post the linked row's configured display value;
// name is limited to 10 characters and one stored row contributes // name is limited to 10 characters and one stored row contributes
// one line to the profile journal) // one line to the profile journal)
// INT // INT

Binary file not shown.

View File

@@ -13,10 +13,6 @@ 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)]
@@ -154,9 +150,8 @@ pub struct ColumnDefinition {
/// TIME (timezone-free time of day) /// TIME (timezone-free time of day)
/// MONEY (= unconstrained NUMERIC; currency comes from the table) /// MONEY (= unconstrained NUMERIC; currency comes from the table)
/// ACCOUNTING (creates schema-managed name, debit, and credit columns; /// ACCOUNTING (creates schema-managed name, debit, and credit columns;
/// the table creator must separately provide a column named account /// automatically creates a required accounts_id link and posts
/// with any supported type or a required link to a table named account; /// the referenced canonical account row's account value;
/// linked accounts post the linked row's configured display value;
/// name is limited to 10 characters and one stored row contributes /// name is limited to 10 characters and one stored row contributes
/// one line to the profile journal) /// one line to the profile journal)
/// INT /// INT

View File

@@ -93,7 +93,6 @@ 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(
@@ -102,7 +101,6 @@ 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: 2b4dfbf8ff...8dd5dcbdcb