diff options
| author | Joe Carstairs <me@joeac.net> | 2025-08-25 16:35:45 +0000 |
|---|---|---|
| committer | joeac <me@joeac.net> | 2025-08-25 16:35:45 +0000 |
| commit | fe85652e4d3e8906824baddaafd05d19105579b8 (patch) | |
| tree | 31b56e31cbf289a34ec1d6707becf3c60933b56f /schist_core/schist_models/migrations | |
| parent | d082a30de6a0cbd1fbe2ab5a4316db0891004129 (diff) | |
task-072
Co-authored-by: Joe Carstairs <jcarstairs@scottlogic.com>
Reviewed-on: https://git.joeac.net/joeac/schist/pulls/3
Co-authored-by: Joe Carstairs <me@joeac.net>
Co-committed-by: Joe Carstairs <me@joeac.net>
Diffstat (limited to 'schist_core/schist_models/migrations')
3 files changed, 2 insertions, 54 deletions
diff --git a/schist_core/schist_models/migrations/2024-08-31-084439_initial_setup/up.sql b/schist_core/schist_models/migrations/2024-08-31-084439_initial_setup/up.sql index 275f280..b37c626 100644 --- a/schist_core/schist_models/migrations/2024-08-31-084439_initial_setup/up.sql +++ b/schist_core/schist_models/migrations/2024-08-31-084439_initial_setup/up.sql @@ -66,7 +66,8 @@ CREATE TABLE pipes( id INTEGER NOT NULL PRIMARY KEY, amount INTEGER NOT NULL, bucket_id INTEGER NOT NULL, - period TEXT NOT NULL, + period_length INTEGER NOT NULL, + period_unit TEXT NOT NULL, start_date TEXT NOT NULL, FOREIGN KEY (bucket_id) REFERENCES buckets (id) diff --git a/schist_core/schist_models/migrations/2025-08-15-090859_dummy_data/down.sql b/schist_core/schist_models/migrations/2025-08-15-090859_dummy_data/down.sql deleted file mode 100644 index 8050572..0000000 --- a/schist_core/schist_models/migrations/2025-08-15-090859_dummy_data/down.sql +++ /dev/null @@ -1,39 +0,0 @@ -DELETE FROM accounts - WHERE id=0 - AND name="Nationwide bank account" - AND opening_balance=0 - AND opening_date="2024-01-01"; - -DELETE FROM accounts - WHERE id=1 - AND name="cash account" - AND opening_balance=0 - AND opening_date="2024-01-01"; - -DELETE FROM accounts - WHERE id=2 - AND name="YBS savings account" - AND opening_balance=0 - AND opening_date="2024-01-01"; - -DELETE FROM buckets - WHERE id=0 - AND balance IS NULL - AND balance_cache_key IS NULL - AND bucket_group="normal expenses" - AND name="groceries"; - -DELETE FROM buckets - WHERE id=1 - AND balance IS NULL - AND balance_cache_key IS NULL - AND bucket_group="luxuries" - AND name="bevvy"; - -DELETE FROM buckets - WHERE id=2 - AND balance IS NULL - AND balance_cache_key IS NULL - AND bucket_group="income" - AND name="salary"; - diff --git a/schist_core/schist_models/migrations/2025-08-15-090859_dummy_data/up.sql b/schist_core/schist_models/migrations/2025-08-15-090859_dummy_data/up.sql deleted file mode 100644 index f5c97d0..0000000 --- a/schist_core/schist_models/migrations/2025-08-15-090859_dummy_data/up.sql +++ /dev/null @@ -1,14 +0,0 @@ -INSERT INTO accounts - (id, name, opening_balance, opening_date) - VALUES - (0, "Nationwide bank account", 0, "2024-01-01"), - (1, "cash account", 0, "2024-01-01"), - (2, "YBS savings account", 0, "2024-01-01"); - -INSERT INTO buckets - (id, balance, balance_cache_key, bucket_group, name) - VALUES - (0, NULL, NULL, "normal expenses", "groceries"), - (1, NULL, NULL, "luxuries", "bevvy"), - (2, NULL, NULL, "income", "salary"); - |
