Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
danial29rus committed Feb 26, 2023
1 parent dc6e591 commit a5f5ca9
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
7 changes: 7 additions & 0 deletions .env-non-dev
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.space
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
"""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
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '2a6f44656431'
down_revision = '1f705f881564'
revision = '1a177222fcb8'
down_revision = None
branch_labels = None
depends_on = None

Expand Down Expand Up @@ -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')
Expand Down

0 comments on commit a5f5ca9

Please sign in to comment.