-
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.
remove items router and table from database
- Loading branch information
Showing
10 changed files
with
44 additions
and
388 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
backend/app/app/alembic/versions/516457e800b5_remove_items.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,34 @@ | ||
"""Remove items | ||
Revision ID: 516457e800b5 | ||
Revises: ac46c9f37d67 | ||
Create Date: 2024-08-22 14:06:51.334874 | ||
""" | ||
import sqlalchemy as sa | ||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = '516457e800b5' | ||
down_revision = 'ac46c9f37d67' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_table('item') | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.create_table('item', | ||
sa.Column('description', sa.VARCHAR(length=255), autoincrement=False, nullable=True), | ||
sa.Column('title', sa.VARCHAR(length=255), autoincrement=False, nullable=False), | ||
sa.Column('id', sa.UUID(), autoincrement=False, nullable=False), | ||
sa.Column('owner_id', sa.UUID(), autoincrement=False, nullable=False), | ||
sa.ForeignKeyConstraint(['owner_id'], ['user.id'], name='item_owner_id_fkey', ondelete='CASCADE'), | ||
sa.PrimaryKeyConstraint('id', name='item_pkey') | ||
) | ||
# ### 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 |
---|---|---|
@@ -1,10 +1,9 @@ | ||
from fastapi import APIRouter | ||
|
||
from app.api.routes import items, login, pipelines, users, utils | ||
from app.api.routes import login, pipelines, users, utils | ||
|
||
api_router = APIRouter() | ||
api_router.include_router(login.router, tags=["login"]) | ||
api_router.include_router(users.router, prefix="/users", tags=["users"]) | ||
api_router.include_router(utils.router, prefix="/utils", tags=["utils"]) | ||
api_router.include_router(items.router, prefix="/items", tags=["items"]) | ||
api_router.include_router(pipelines.router, prefix="/pipelines", tags=["pipelines"]) |
This file was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
|
@@ -4,15 +4,6 @@ Content-Type: application/x-www-form-urlencoded | |
|
||
[email protected]&password=changethis | ||
|
||
### | ||
POST http://localhost:80/api/v1/items | ||
Content-Type: application/json | ||
Authorization: bearer put_the_access_token_here | ||
|
||
{ | ||
"title": "test" | ||
} | ||
|
||
### | ||
|
||
POST http://localhost:80/api/v1/pipelines | ||
|
Oops, something went wrong.