-
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.
Merge pull request #39 from AndrewSergienko/develop
Develop
- Loading branch information
Showing
88 changed files
with
1,697 additions
and
455 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,11 @@ | ||
FROM python:3.10 | ||
|
||
ENV PYTHONUNBUFFERED 1 | ||
|
||
WORKDIR /app | ||
COPY requirements.txt ./ | ||
RUN pip install -r requirements.txt --default-timeout=100 | ||
|
||
COPY . ./ | ||
|
||
EXPOSE 8000 |
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,29 @@ | ||
"""empty message | ||
Revision ID: 0c6eed52399f | ||
Revises: 804ce544203d | ||
Create Date: 2023-06-11 10:12:39.465349 | ||
""" | ||
import sqlalchemy as sa | ||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "0c6eed52399f" | ||
down_revision = "804ce544203d" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.add_column("categories", sa.Column("parent_id", sa.Integer(), nullable=True)) | ||
op.create_foreign_key(None, "categories", "categories", ["parent_id"], ["id"]) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_constraint(None, "categories", type_="foreignkey") | ||
op.drop_column("categories", "parent_id") | ||
# ### end Alembic commands ### |
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,29 @@ | ||
"""empty message | ||
Revision ID: 48d00b4868c7 | ||
Revises: 8db0b3c70d3d | ||
Create Date: 2023-06-11 17:47:49.545536 | ||
""" | ||
import sqlalchemy as sa | ||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "48d00b4868c7" | ||
down_revision = "8db0b3c70d3d" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.add_column("limits", sa.Column("user_id", sa.Integer(), nullable=True)) | ||
op.create_foreign_key(None, "limits", "users", ["user_id"], ["id"]) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_constraint(None, "limits", type_="foreignkey") | ||
op.drop_column("limits", "user_id") | ||
# ### end Alembic commands ### |
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,45 @@ | ||
"""categories | ||
Revision ID: 725589cc0adb | ||
Revises: 79110a6de7e7 | ||
Create Date: 2023-05-10 11:00:59.952790 | ||
""" | ||
import sqlalchemy as sa | ||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "725589cc0adb" | ||
down_revision = "79110a6de7e7" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.create_table( | ||
"categories", | ||
sa.Column("id", sa.Integer(), nullable=False), | ||
sa.Column("name", sa.String(), nullable=False), | ||
sa.Column("user_id", sa.Integer(), nullable=True), | ||
sa.ForeignKeyConstraint( | ||
["user_id"], | ||
["users.id"], | ||
), | ||
sa.PrimaryKeyConstraint("id"), | ||
) | ||
op.add_column("operations", sa.Column("category_id", sa.Integer(), nullable=True)) | ||
op.create_foreign_key(None, "operations", "categories", ["category_id"], ["id"]) | ||
op.drop_column("operations", "mcc") | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.add_column( | ||
"operations", sa.Column("mcc", sa.INTEGER(), autoincrement=False, nullable=True) | ||
) | ||
op.drop_constraint(None, "operations", type_="foreignkey") | ||
op.drop_column("operations", "category_id") | ||
op.drop_table("categories") | ||
# ### end Alembic commands ### |
52 changes: 52 additions & 0 deletions
52
migration/versions/79110a6de7e7_change_bankinfoproperty_field_names.py
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,52 @@ | ||
"""change BankInfoProperty field names | ||
Revision ID: 79110a6de7e7 | ||
Revises: 86f9d6304908 | ||
Create Date: 2023-05-02 23:57:37.004802 | ||
""" | ||
import sqlalchemy as sa | ||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "79110a6de7e7" | ||
down_revision = "86f9d6304908" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.add_column( | ||
"banks_info_properties", sa.Column("prop_name", sa.String(), nullable=False) | ||
) | ||
op.add_column( | ||
"banks_info_properties", sa.Column("prop_value", sa.String(), nullable=False) | ||
) | ||
op.add_column( | ||
"banks_info_properties", sa.Column("prop_type", sa.String(), nullable=False) | ||
) | ||
op.drop_column("banks_info_properties", "name") | ||
op.drop_column("banks_info_properties", "type") | ||
op.drop_column("banks_info_properties", "value") | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.add_column( | ||
"banks_info_properties", | ||
sa.Column("value", sa.VARCHAR(), autoincrement=False, nullable=False), | ||
) | ||
op.add_column( | ||
"banks_info_properties", | ||
sa.Column("type", sa.VARCHAR(), autoincrement=False, nullable=False), | ||
) | ||
op.add_column( | ||
"banks_info_properties", | ||
sa.Column("name", sa.VARCHAR(), autoincrement=False, nullable=False), | ||
) | ||
op.drop_column("banks_info_properties", "prop_type") | ||
op.drop_column("banks_info_properties", "prop_value") | ||
op.drop_column("banks_info_properties", "prop_name") | ||
# ### end Alembic commands ### |
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,29 @@ | ||
"""empty message | ||
Revision ID: 804ce544203d | ||
Revises: f2d154c7bc55 | ||
Create Date: 2023-06-01 11:36:35.436792 | ||
""" | ||
import sqlalchemy as sa | ||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "804ce544203d" | ||
down_revision = "f2d154c7bc55" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.add_column("categories", sa.Column("icon_name", sa.String(), nullable=True)) | ||
op.add_column("categories", sa.Column("icon_color", sa.String(), nullable=True)) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_column("categories", "icon_color") | ||
op.drop_column("categories", "icon_name") | ||
# ### end Alembic commands ### |
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,38 @@ | ||
"""empty message | ||
Revision ID: 8db0b3c70d3d | ||
Revises: 0c6eed52399f | ||
Create Date: 2023-06-11 17:45:07.399501 | ||
""" | ||
import sqlalchemy as sa | ||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "8db0b3c70d3d" | ||
down_revision = "0c6eed52399f" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.create_table( | ||
"limits", | ||
sa.Column("id", sa.Integer(), nullable=False), | ||
sa.Column("category_id", sa.Integer(), nullable=True), | ||
sa.Column("limit", sa.Integer(), nullable=True), | ||
sa.Column("date_range", sa.String(), nullable=True), | ||
sa.ForeignKeyConstraint( | ||
["category_id"], | ||
["categories.id"], | ||
), | ||
sa.PrimaryKeyConstraint("id"), | ||
) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_table("limits") | ||
# ### end Alembic commands ### |
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,27 @@ | ||
"""empty message | ||
Revision ID: f2d154c7bc55 | ||
Revises: 725589cc0adb | ||
Create Date: 2023-05-17 14:49:41.201539 | ||
""" | ||
import sqlalchemy as sa | ||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "f2d154c7bc55" | ||
down_revision = "725589cc0adb" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.add_column("categories", sa.Column("type", sa.String(), nullable=True)) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_column("categories", "type") | ||
# ### end Alembic commands ### |
Binary file not shown.
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
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
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,25 @@ | ||
class Category: | ||
id: int | None | ||
name: str | ||
user_id: int | None | ||
type: str | ||
icon_name: str | None | ||
icon_color: str | None | ||
|
||
def __init__( | ||
self, | ||
name: str, | ||
user_id: int | None, | ||
type: str, | ||
id: int | None = None, | ||
icon_name: str | None = None, | ||
icon_color: str | None = None, | ||
parent_id: int | None = None, | ||
): | ||
self.id = id | ||
self.name = name | ||
self.user_id = user_id | ||
self.type = type | ||
self.icon_name = icon_name | ||
self.icon_color = icon_color | ||
self.parent_id = parent_id |
Oops, something went wrong.