-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: more transaction categories (#180)
* schema: add investments transaction category * fix: interest income transaction category spelling
- Loading branch information
1 parent
6d478dd
commit 7151b42
Showing
3 changed files
with
53 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
BEGIN; | ||
|
||
ALTER TYPE expense_category RENAME TO expense_category_old; | ||
|
||
CREATE TYPE expense_category AS ENUM ( | ||
'restaurants', | ||
'shopping', | ||
'services', | ||
'entertainment', | ||
'groceries', | ||
'salary', | ||
'interest Income', | ||
'utilities', | ||
'pharmacy', | ||
'transfer', | ||
'transport', | ||
'others' | ||
); | ||
|
||
ALTER TABLE expenses | ||
ALTER COLUMN category TYPE expense_category | ||
USING category::text::expense_category; | ||
|
||
DROP TYPE expense_category_old; | ||
|
||
COMMIT; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
BEGIN; | ||
ALTER TYPE expense_category RENAME TO expense_category_old; | ||
CREATE TYPE expense_category AS ENUM ( | ||
'restaurants', | ||
'shopping', | ||
'services', | ||
'entertainment', | ||
'groceries', | ||
'salary', | ||
'interestincome', | ||
'utilities', | ||
'pharmacy', | ||
'transfer', | ||
'transport', | ||
'others', | ||
'investments' | ||
); | ||
ALTER TABLE expenses | ||
ALTER COLUMN category TYPE expense_category | ||
USING category::text::expense_category; | ||
DROP TYPE expense_category_old; | ||
COMMIT; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters