Added source and destination accounts.

This commit is contained in:
2026-09-27 11:04:47 +02:00
parent d219d63dca
commit 26a370aa31
16 changed files with 253 additions and 122 deletions
@@ -1,84 +0,0 @@
{
"db_name": "PostgreSQL",
"query": "\n INSERT INTO recurring_transactions (\n id,\n name,\n amount_cents,\n direction,\n starts_at,\n ends_at,\n recurrence_every,\n recurrence_unit,\n weekend_adjustment\n )\n VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9)\n ON CONFLICT (id) DO UPDATE SET\n name = EXCLUDED.name,\n amount_cents = EXCLUDED.amount_cents,\n direction = EXCLUDED.direction,\n starts_at = EXCLUDED.starts_at,\n ends_at = EXCLUDED.ends_at,\n recurrence_every = EXCLUDED.recurrence_every,\n recurrence_unit = EXCLUDED.recurrence_unit,\n weekend_adjustment = EXCLUDED.weekend_adjustment\n RETURNING WITH (OLD AS old_row, NEW AS new_row)\n old_row.id AS \"old_id?\",\n new_row.id AS \"id!\",\n new_row.name AS \"name!\",\n new_row.amount_cents AS \"amount_cents!\",\n new_row.direction AS \"direction!\",\n new_row.starts_at AS \"starts_at!\",\n new_row.ends_at AS \"ends_at?\",\n new_row.recurrence_every AS \"recurrence_every!\",\n new_row.recurrence_unit AS \"recurrence_unit!\",\n new_row.weekend_adjustment AS \"weekend_adjustment?\"\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "old_id?",
"type_info": "Uuid"
},
{
"ordinal": 1,
"name": "id!",
"type_info": "Uuid"
},
{
"ordinal": 2,
"name": "name!",
"type_info": "Text"
},
{
"ordinal": 3,
"name": "amount_cents!",
"type_info": "Int8"
},
{
"ordinal": 4,
"name": "direction!",
"type_info": "Text"
},
{
"ordinal": 5,
"name": "starts_at!",
"type_info": "Timestamptz"
},
{
"ordinal": 6,
"name": "ends_at?",
"type_info": "Timestamptz"
},
{
"ordinal": 7,
"name": "recurrence_every!",
"type_info": "Int4"
},
{
"ordinal": 8,
"name": "recurrence_unit!",
"type_info": "Text"
},
{
"ordinal": 9,
"name": "weekend_adjustment?",
"type_info": "Text"
}
],
"parameters": {
"Left": [
"Uuid",
"Text",
"Int8",
"Text",
"Timestamptz",
"Timestamptz",
"Int4",
"Text",
"Text"
]
},
"nullable": [
false,
false,
false,
false,
false,
false,
true,
false,
false,
true
]
},
"hash": "0670f762b989960690b3975bf3f9b03ecc2c407701f1952f4b4e40fc9d6e12d1"
}
@@ -1,6 +1,6 @@
{
"db_name": "PostgreSQL",
"query": "\n SELECT\n id,\n name,\n amount_cents,\n direction,\n starts_at,\n ends_at,\n recurrence_every,\n recurrence_unit,\n weekend_adjustment\n FROM recurring_transactions\n ORDER BY starts_at DESC, id DESC\n LIMIT $1 OFFSET $2\n ",
"query": "\n SELECT\n id,\n name,\n amount_cents,\n direction,\n source_account_id,\n destination_account_id,\n starts_at,\n ends_at,\n recurrence_every,\n recurrence_unit,\n weekend_adjustment\n FROM recurring_transactions\n ORDER BY starts_at DESC, id DESC\n LIMIT $1 OFFSET $2\n ",
"describe": {
"columns": [
{
@@ -25,26 +25,36 @@
},
{
"ordinal": 4,
"name": "source_account_id",
"type_info": "Uuid"
},
{
"ordinal": 5,
"name": "destination_account_id",
"type_info": "Uuid"
},
{
"ordinal": 6,
"name": "starts_at",
"type_info": "Timestamptz"
},
{
"ordinal": 5,
"ordinal": 7,
"name": "ends_at",
"type_info": "Timestamptz"
},
{
"ordinal": 6,
"ordinal": 8,
"name": "recurrence_every",
"type_info": "Int4"
},
{
"ordinal": 7,
"ordinal": 9,
"name": "recurrence_unit",
"type_info": "Text"
},
{
"ordinal": 8,
"ordinal": 10,
"name": "weekend_adjustment",
"type_info": "Text"
}
@@ -60,6 +70,8 @@
false,
false,
false,
true,
true,
false,
true,
false,
@@ -67,5 +79,5 @@
true
]
},
"hash": "b90fc3934e144910e05cddcfb11e66a670b842a4636960ac59f18d741cd9cc28"
"hash": "a67033cd73e269ec203817b402ef40647a1965dca8419e6aa9d33a5dfa9e5426"
}
@@ -0,0 +1,98 @@
{
"db_name": "PostgreSQL",
"query": "\n INSERT INTO recurring_transactions (\n id,\n name,\n amount_cents,\n direction,\n source_account_id,\n destination_account_id,\n starts_at,\n ends_at,\n recurrence_every,\n recurrence_unit,\n weekend_adjustment\n )\n VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11)\n ON CONFLICT (id) DO UPDATE SET\n name = EXCLUDED.name,\n amount_cents = EXCLUDED.amount_cents,\n direction = EXCLUDED.direction,\n source_account_id = EXCLUDED.source_account_id,\n destination_account_id = EXCLUDED.destination_account_id,\n starts_at = EXCLUDED.starts_at,\n ends_at = EXCLUDED.ends_at,\n recurrence_every = EXCLUDED.recurrence_every,\n recurrence_unit = EXCLUDED.recurrence_unit,\n weekend_adjustment = EXCLUDED.weekend_adjustment\n RETURNING WITH (OLD AS old_row, NEW AS new_row)\n old_row.id AS \"old_id?\",\n new_row.id AS \"id!\",\n new_row.name AS \"name!\",\n new_row.amount_cents AS \"amount_cents!\",\n new_row.direction AS \"direction!\",\n new_row.source_account_id AS \"source_account_id?\",\n new_row.destination_account_id AS \"destination_account_id?\",\n new_row.starts_at AS \"starts_at!\",\n new_row.ends_at AS \"ends_at?\",\n new_row.recurrence_every AS \"recurrence_every!\",\n new_row.recurrence_unit AS \"recurrence_unit!\",\n new_row.weekend_adjustment AS \"weekend_adjustment?\"\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "old_id?",
"type_info": "Uuid"
},
{
"ordinal": 1,
"name": "id!",
"type_info": "Uuid"
},
{
"ordinal": 2,
"name": "name!",
"type_info": "Text"
},
{
"ordinal": 3,
"name": "amount_cents!",
"type_info": "Int8"
},
{
"ordinal": 4,
"name": "direction!",
"type_info": "Text"
},
{
"ordinal": 5,
"name": "source_account_id?",
"type_info": "Uuid"
},
{
"ordinal": 6,
"name": "destination_account_id?",
"type_info": "Uuid"
},
{
"ordinal": 7,
"name": "starts_at!",
"type_info": "Timestamptz"
},
{
"ordinal": 8,
"name": "ends_at?",
"type_info": "Timestamptz"
},
{
"ordinal": 9,
"name": "recurrence_every!",
"type_info": "Int4"
},
{
"ordinal": 10,
"name": "recurrence_unit!",
"type_info": "Text"
},
{
"ordinal": 11,
"name": "weekend_adjustment?",
"type_info": "Text"
}
],
"parameters": {
"Left": [
"Uuid",
"Text",
"Int8",
"Text",
"Uuid",
"Uuid",
"Timestamptz",
"Timestamptz",
"Int4",
"Text",
"Text"
]
},
"nullable": [
false,
false,
false,
false,
false,
true,
true,
false,
true,
false,
false,
true
]
},
"hash": "cd3573646e7cfe523b7dc97092134f22568eb9288e8d56522bdfbbc2aab43fb4"
}
@@ -1,6 +1,6 @@
{
"db_name": "PostgreSQL",
"query": "\n SELECT\n id,\n name,\n amount_cents,\n direction,\n starts_at,\n ends_at,\n recurrence_every,\n recurrence_unit,\n weekend_adjustment\n FROM recurring_transactions\n WHERE id = $1\n ",
"query": "\n SELECT\n id,\n name,\n amount_cents,\n direction,\n source_account_id,\n destination_account_id,\n starts_at,\n ends_at,\n recurrence_every,\n recurrence_unit,\n weekend_adjustment\n FROM recurring_transactions\n WHERE id = $1\n ",
"describe": {
"columns": [
{
@@ -25,26 +25,36 @@
},
{
"ordinal": 4,
"name": "source_account_id",
"type_info": "Uuid"
},
{
"ordinal": 5,
"name": "destination_account_id",
"type_info": "Uuid"
},
{
"ordinal": 6,
"name": "starts_at",
"type_info": "Timestamptz"
},
{
"ordinal": 5,
"ordinal": 7,
"name": "ends_at",
"type_info": "Timestamptz"
},
{
"ordinal": 6,
"ordinal": 8,
"name": "recurrence_every",
"type_info": "Int4"
},
{
"ordinal": 7,
"ordinal": 9,
"name": "recurrence_unit",
"type_info": "Text"
},
{
"ordinal": 8,
"ordinal": 10,
"name": "weekend_adjustment",
"type_info": "Text"
}
@@ -59,6 +69,8 @@
false,
false,
false,
true,
true,
false,
true,
false,
@@ -66,5 +78,5 @@
true
]
},
"hash": "1a4dc56d068d3d5b531ca43e8e0bc5ba6789ffce3f896334780965afd1cc214f"
"hash": "fae9d6766e5bce18e7917df6a0d6ad13ec035b8d409b880d6cff2ef9e2615fa4"
}