automatic accounting - removing deprecacy/legacy

This commit is contained in:
Priec
2026-07-22 12:22:24 +02:00
parent 7c022daab5
commit d10546715a
15 changed files with 17 additions and 32 deletions

2
client

Submodule client updated: 087f2afaa3...1abb27eecc

View File

@@ -181,7 +181,7 @@ message JournalLine {
string source_table_name = 10;
int64 source_record_id = 11;
int64 source_row_revision = 12;
int64 posting_script_id = 13;
reserved 13;
}
message Journal {

View File

@@ -170,6 +170,8 @@ message ColumnDefinition {
// PHONE (international or national phone number; generates extension/type/country/calling-code companions)
// TIME (timezone-free time of day)
// MONEY (= unconstrained NUMERIC; currency comes from the table)
// ACCOUNTING (creates the schema-managed name, debit, and credit columns;
// one stored row contributes one line to the profile journal)
// INT
// BIGINT
// DATE

View File

@@ -172,14 +172,14 @@ message StoredTableScript {
}
message ScriptDependency {
reserved 4;
// Logical table name referenced by the script.
string target_table = 1;
// Normalized dependency kind, such as column_access or related_aggregate.
string dependency_type = 2;
// Logical column name. Empty for aggregates that operate on rows only.
string column = 3;
// Deprecated legacy field. Raw SQL dependencies are no longer produced.
string query_fragment = 4;
// Aggregate operation name, such as sum, count_rows, or exists; empty for
// column_access dependencies.
string operation = 5;

View File

@@ -121,11 +121,7 @@ message PostTableDataRequest {
// - Some application-specific validations may apply (e.g., max length for
// certain fields like "telefon")
map<string, google.protobuf.Value> data = 3;
// Optional. Existing journal that receives the posting generated for this row.
// Required when the table has an active after-insert posting script and rejected
// when the table has no active posting script.
optional int64 journal_id = 4;
reserved 4;
}
// Insert response.
@@ -150,9 +146,7 @@ message PostTableDataResponse {
message PostTableDataBulkRow {
// Required. Same data payload as PostTableDataRequest.data.
map<string, google.protobuf.Value> data = 1;
// Optional. Existing journal that receives the posting generated for this row.
optional int64 journal_id = 2;
reserved 2;
}
// Bulk insert request.

Binary file not shown.

View File

@@ -202,8 +202,6 @@ pub struct JournalLine {
pub source_record_id: i64,
#[prost(int64, tag = "12")]
pub source_row_revision: i64,
#[prost(int64, tag = "13")]
pub posting_script_id: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Journal {

View File

@@ -141,6 +141,8 @@ pub struct ColumnDefinition {
/// PHONE (international or national phone number; generates extension/type/country/calling-code companions)
/// TIME (timezone-free time of day)
/// MONEY (= unconstrained NUMERIC; currency comes from the table)
/// ACCOUNTING (creates the schema-managed name, debit, and credit columns;
/// one stored row contributes one line to the profile journal)
/// INT
/// BIGINT
/// DATE

View File

@@ -123,9 +123,6 @@ pub struct ScriptDependency {
/// Logical column name. Empty for aggregates that operate on rows only.
#[prost(string, tag = "3")]
pub column: ::prost::alloc::string::String,
/// Deprecated legacy field. Raw SQL dependencies are no longer produced.
#[prost(string, tag = "4")]
pub query_fragment: ::prost::alloc::string::String,
/// Aggregate operation name, such as sum, count_rows, or exists; empty for
/// column_access dependencies.
#[prost(string, tag = "5")]

View File

@@ -45,11 +45,6 @@ pub struct PostTableDataRequest {
::prost::alloc::string::String,
::prost_types::Value,
>,
/// Optional. Existing journal that receives the posting generated for this row.
/// Required when the table has an active after-insert posting script and rejected
/// when the table has no active posting script.
#[prost(int64, optional, tag = "4")]
pub journal_id: ::core::option::Option<i64>,
}
/// Insert response.
#[derive(Clone, PartialEq, ::prost::Message)]
@@ -79,9 +74,6 @@ pub struct PostTableDataBulkRow {
::prost::alloc::string::String,
::prost_types::Value,
>,
/// Optional. Existing journal that receives the posting generated for this row.
#[prost(int64, optional, tag = "2")]
pub journal_id: ::core::option::Option<i64>,
}
/// Bulk insert request.
#[derive(Clone, PartialEq, ::prost::Message)]

View File

@@ -104,9 +104,10 @@ impl CreateTableForm {
}),
);
let has_money = columns
.iter()
.any(|column| column.field_type.eq_ignore_ascii_case("money"));
let has_money = columns.iter().any(|column| {
column.field_type.eq_ignore_ascii_case("money")
|| column.field_type.eq_ignore_ascii_case("accounting")
});
let base_currency = self.base_currency.trim().to_ascii_uppercase();
if has_money && base_currency.is_empty() {
return Err("A base currency is required when a MONEY column is used.".to_string());

View File

@@ -184,7 +184,6 @@ fn row_for_table(table: &ImportTable, positions: &[(usize, String)], row: &[Stri
}
Ok(PostTableDataBulkRow {
data,
journal_id: None,
})
}

2
server

Submodule server updated: e52b2ab6e4...549f26df70