Skip to content

karlaevelize/task-management-fastapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Alembic

Extra steps:

  1. $ brew install postgresql

  2. $ pip install psycopg2

  3. Check with $ which pg_config

Alembic steps

  1. On your terminal, run $ alembic init alembic

    • it creates a new directory alembic and a new file alembic.ini
  2. Go to alembic.init and add the database url

    • line 58: sqlalchemy.url = ADD DATABASE URL HERE
  3. Go to alembic/env.py and add your models

from models import Base
target_metadata = Base.metadata
  1. Create alembic revision
$ alembic revision --autogenerate -m "First revision"
$ pipenv run alembic upgrade head

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published