diff options
| author | joeac <me@joeac.net> | 2026-01-17 17:17:50 +0000 |
|---|---|---|
| committer | joeac <me@joeac.net> | 2026-01-17 17:17:50 +0000 |
| commit | bf74f305894bde98033932235a4210c7d6865adf (patch) | |
| tree | 051422c97fcb5d7c2eafd426ea66e1a906948747 /schist_core/schist_models/migrations | |
| parent | fe85652e4d3e8906824baddaafd05d19105579b8 (diff) | |
| parent | f69ec8416c4e6301dcfa06791b025785d7f61b6b (diff) | |
Merge pull request 'random-stuff' (#4) from random-stuff into main
Reviewed-on: https://git.joeac.net/joeac/schist/pulls/4
Diffstat (limited to 'schist_core/schist_models/migrations')
| -rw-r--r-- | schist_core/schist_models/migrations/2024-08-31-084439_initial_setup/down.sql | 2 | ||||
| -rw-r--r-- | schist_core/schist_models/migrations/2024-08-31-084439_initial_setup/up.sql | 12 |
2 files changed, 5 insertions, 9 deletions
diff --git a/schist_core/schist_models/migrations/2024-08-31-084439_initial_setup/down.sql b/schist_core/schist_models/migrations/2024-08-31-084439_initial_setup/down.sql index 3b2c73e..f6ead07 100644 --- a/schist_core/schist_models/migrations/2024-08-31-084439_initial_setup/down.sql +++ b/schist_core/schist_models/migrations/2024-08-31-084439_initial_setup/down.sql @@ -1,7 +1,7 @@ DROP TABLE accounts; DROP TABLE account_transfers; DROP TABLE buckets; -DROP TABLE bucket_transfers; +DROP TABLE bucket_transactions; DROP TABLE drips; DROP TABLE pipes; DROP TABLE transactions; 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 b37c626..da85b33 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 @@ -32,17 +32,13 @@ CREATE TABLE buckets( name TEXT NOT NULL ); -CREATE TABLE bucket_transfers( +CREATE TABLE bucket_transactions( id INTEGER NOT NULL PRIMARY KEY, amount INTEGER NOT NULL, + bucket_id INTEGER NOT NULL, + date TEXT NOT NULL, description TEXT NOT NULL, - from_bucket_id INTEGER NOT NULL, - to_bucket_id INTEGER NOT NULL, - FOREIGN KEY (from_bucket_id) - REFERENCES buckets (id) - ON UPDATE CASCADE - ON DELETE RESTRICT, - FOREIGN KEY (to_bucket_id) + FOREIGN KEY (bucket_id) REFERENCES buckets (id) ON UPDATE CASCADE ON DELETE RESTRICT |
