Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DB migration tool #58

Closed
3 tasks done
Tracked by #76
afred opened this issue Jun 27, 2023 · 1 comment
Closed
3 tasks done
Tracked by #76

Add DB migration tool #58

afred opened this issue Jun 27, 2023 · 1 comment
Assignees

Comments

@afred
Copy link
Contributor

afred commented Jun 27, 2023

Because

As a Developer
I can use a migration tool to

Tasks

In order to

  • have a single tool for creating / setting up database in test, development, and production environments
  • have a production-ready tool for managing DB schema changes without data loss or wholesale DB reset operations
  • avoid concurrency issues in Github CI due to using SQLModel.metadata.create_all()
    ERROR tests/test_app.py - sqlalchemy.exc.IntegrityError: (psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "pg_type_typname_nsp_index"
    DETAIL:  Key (typname, typnamespace)=(mediatype, 2200) already exists.
    

Done when

Users story is satisfied (check boxes)

Additional context

Most sources say that Alembic is the best tool for SQLAlchemy, and thus also SQLModel.

@afred afred self-assigned this Jun 27, 2023
@afred
Copy link
Contributor Author

afred commented Jul 6, 2023

closed by #73

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

No branches or pull requests

2 participants