Skip to content

Commit 0694f4a

Browse files
committed
- **Added new fields to StagedTransactionModel:**
- Introduced `matched_transaction_model` as a One-to-One field linked to `TransactionModel`. - Added `matched_transaction` BooleanField indicating if a transaction is matched. - Added `notes` TextField for storing additional transaction details. - **Indexes and field updates:** - Added an index on `matched_transaction_model` for optimized lookups. - Updated `transaction_model` field to enhance its definition. - **Altered `JournalEntryModel`:** - Adjusted the `description` field to allow optional entries with a maximum length of 120 characters. ### **Summary** Introduced enhanced fields in `StagedTransactionModel`, including transaction matching, notes, and indexing for better transaction workflows. Updated `JournalEntryModel` description field for flexibility and optional usage. ### **Backwards Compatibility** These changes are backwards compatible; legacy workflows will not be impacted.
1 parent 204ec14 commit 0694f4a

File tree

2 files changed

+56
-0
lines changed

2 files changed

+56
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Generated by Django 5.2.7 on 2025-11-01 20:38
2+
3+
import django.db.models.deletion
4+
from django.db import migrations, models
5+
6+
7+
class Migration(migrations.Migration):
8+
9+
dependencies = [
10+
('django_ledger', '0027_alter_accountmodel_role_alter_receiptmodel_amount_and_more'),
11+
]
12+
13+
operations = [
14+
migrations.AddField(
15+
model_name='stagedtransactionmodel',
16+
name='matched_transaction_model',
17+
field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='matchedtransaction_model', to='django_ledger.transactionmodel', verbose_name='Matched Transaction Model'),
18+
),
19+
migrations.AlterField(
20+
model_name='stagedtransactionmodel',
21+
name='transaction_model',
22+
field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='django_ledger.transactionmodel', verbose_name='Transaction Model'),
23+
),
24+
migrations.AddIndex(
25+
model_name='stagedtransactionmodel',
26+
index=models.Index(fields=['matched_transaction_model'], name='django_ledg_matched_dde2a7_idx'),
27+
),
28+
]
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Generated by Django 5.2.7 on 2025-11-11 02:41
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('django_ledger', '0028_stagedtransactionmodel_matched_transaction_model_and_more'),
10+
]
11+
12+
operations = [
13+
migrations.AddField(
14+
model_name='stagedtransactionmodel',
15+
name='matched_transaction',
16+
field=models.BooleanField(default=False, help_text='Indicates whether this transaction is matched to another.', verbose_name='Matched Transaction'),
17+
),
18+
migrations.AddField(
19+
model_name='stagedtransactionmodel',
20+
name='notes',
21+
field=models.TextField(blank=True, null=True, verbose_name='Transaction Notes'),
22+
),
23+
migrations.AlterField(
24+
model_name='journalentrymodel',
25+
name='description',
26+
field=models.CharField(blank=True, max_length=120, null=True, verbose_name='Description'),
27+
),
28+
]

0 commit comments

Comments
 (0)