diff --git a/.env-non-dev b/.env-non-dev new file mode 100644 index 0000000..af70a16 --- /dev/null +++ b/.env-non-dev @@ -0,0 +1,7 @@ +DB_HOST=db +DB_PORT=5432 +DB_NAME=postgres +DB_USER=postgres +DB_PASS=postgres +REDIS_HOST=redis +REDIS_PORT=6379 \ No newline at end of file diff --git a/app/.gitignore b/app/.gitignore new file mode 100644 index 0000000..97861c9 --- /dev/null +++ b/app/.gitignore @@ -0,0 +1 @@ +.space \ No newline at end of file diff --git a/migrations/versions/2a6f44656431_new_database5.py b/migrations/versions/1a177222fcb8_final_test_docker.py similarity index 85% rename from migrations/versions/2a6f44656431_new_database5.py rename to migrations/versions/1a177222fcb8_final_test_docker.py index 6cb8c84..67fceef 100644 --- a/migrations/versions/2a6f44656431_new_database5.py +++ b/migrations/versions/1a177222fcb8_final_test_docker.py @@ -1,8 +1,8 @@ -"""new database5 +"""final_test_docker -Revision ID: 2a6f44656431 -Revises: 1f705f881564 -Create Date: 2023-02-21 11:51:15.309656 +Revision ID: 1a177222fcb8 +Revises: +Create Date: 2023-02-25 19:39:24.956269 """ from alembic import op @@ -10,8 +10,8 @@ # revision identifiers, used by Alembic. -revision = '2a6f44656431' -down_revision = '1f705f881564' +revision = '1a177222fcb8' +down_revision = None branch_labels = None depends_on = None @@ -52,8 +52,8 @@ def upgrade() -> None: sa.Column('date_from', sa.Date(), nullable=False), sa.Column('date_to', sa.Date(), nullable=False), sa.Column('price', sa.Integer(), nullable=False), - sa.Column('total_cost', sa.Integer(), sa.Computed('(date_to - date_from) * price', ), nullable=True), - sa.Column('total_days', sa.Integer(), sa.Computed('date_to - date_from', ), nullable=True), + sa.Column('total_cost', sa.Integer(), nullable=False), + sa.Column('total_days', sa.Integer(), nullable=False), sa.ForeignKeyConstraint(['room_id'], ['rooms.id'], ), sa.ForeignKeyConstraint(['user_id'], ['users.id'], ), sa.PrimaryKeyConstraint('id')