mirror of
https://github.com/elisiariocouto/leggen.git
synced 2025-12-14 12:02:19 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f47644e8c6 | ||
|
|
c0ee21d6fa |
16
CHANGELOG.md
16
CHANGELOG.md
@@ -1,4 +1,20 @@
|
|||||||
|
|
||||||
|
## 2025.9.5 (2025/09/10)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
- Correct composite key migration check ([c0ee21d6](https://github.com/elisiariocouto/leggen/commit/c0ee21d6fa8d5d61c029bd9334a7674fce99f729))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## 2025.9.5 (2025/09/10)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
- Correct composite key migration check ([c0ee21d6](https://github.com/elisiariocouto/leggen/commit/c0ee21d6fa8d5d61c029bd9334a7674fce99f729))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## 2025.9.4 (2025/09/10)
|
## 2025.9.4 (2025/09/10)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
@@ -551,10 +551,15 @@ class DatabaseService:
|
|||||||
# Check if transactions table has the old primary key structure
|
# Check if transactions table has the old primary key structure
|
||||||
cursor.execute("PRAGMA table_info(transactions)")
|
cursor.execute("PRAGMA table_info(transactions)")
|
||||||
columns = cursor.fetchall()
|
columns = cursor.fetchall()
|
||||||
column_names = [col[1] for col in columns]
|
|
||||||
|
|
||||||
# If we have internalTransactionId as primary key, migration is needed
|
# Check if internalTransactionId is the primary key (old structure)
|
||||||
if "internalTransactionId" in column_names:
|
internal_transaction_id_is_pk = any(
|
||||||
|
col[1] == "internalTransactionId" and col[5] == 1 # col[5] is pk flag
|
||||||
|
for col in columns
|
||||||
|
)
|
||||||
|
|
||||||
|
# If internalTransactionId is still the primary key, migration is needed
|
||||||
|
if internal_transaction_id_is_pk:
|
||||||
# Check if there are duplicate (accountId, transactionId) pairs
|
# Check if there are duplicate (accountId, transactionId) pairs
|
||||||
cursor.execute("""
|
cursor.execute("""
|
||||||
SELECT COUNT(*) as duplicates
|
SELECT COUNT(*) as duplicates
|
||||||
@@ -570,6 +575,7 @@ class DatabaseService:
|
|||||||
conn.close()
|
conn.close()
|
||||||
return duplicates > 0
|
return duplicates > 0
|
||||||
else:
|
else:
|
||||||
|
# Migration already completed
|
||||||
conn.close()
|
conn.close()
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "leggen"
|
name = "leggen"
|
||||||
version = "2025.9.4"
|
version = "2025.9.5"
|
||||||
description = "An Open Banking CLI"
|
description = "An Open Banking CLI"
|
||||||
authors = [{ name = "Elisiário Couto", email = "elisiario@couto.io" }]
|
authors = [{ name = "Elisiário Couto", email = "elisiario@couto.io" }]
|
||||||
requires-python = "~=3.13.0"
|
requires-python = "~=3.13.0"
|
||||||
|
|||||||
2
uv.lock
generated
2
uv.lock
generated
@@ -220,7 +220,7 @@ wheels = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "leggen"
|
name = "leggen"
|
||||||
version = "2025.9.4"
|
version = "2025.9.5"
|
||||||
source = { editable = "." }
|
source = { editable = "." }
|
||||||
dependencies = [
|
dependencies = [
|
||||||
{ name = "apscheduler" },
|
{ name = "apscheduler" },
|
||||||
|
|||||||
Reference in New Issue
Block a user