New database migration
Test and Release / test-backend (push) Successful in 6s
Test and Release / test-frontend (push) Successful in 12s
Test and Release / build-docker (backend) (push) Skipped
Test and Release / build-docker (frontend) (push) Skipped
Test and Release / test-backend (release) Successful in 7s
Test and Release / test-frontend (release) Successful in 11s
Test and Release / build-docker (backend) (release) Successful in 9s
Test and Release / build-docker (frontend) (release) Successful in 9s
Test and Release / test-backend (push) Successful in 6s
Test and Release / test-frontend (push) Successful in 12s
Test and Release / build-docker (backend) (push) Skipped
Test and Release / build-docker (frontend) (push) Skipped
Test and Release / test-backend (release) Successful in 7s
Test and Release / test-frontend (release) Successful in 11s
Test and Release / build-docker (backend) (release) Successful in 9s
Test and Release / build-docker (frontend) (release) Successful in 9s
This commit is contained in:
1 parent
b555f16238
commit
989f591417
3 files changed
+29
-8
No files matched your search
@@ -3,15 +3,11 @@
|
||||
import sys
|
||||
from os.path import dirname, abspath
|
||||
from logging.config import fileConfig
|
||||
|
||||
from sqlalchemy import engine_from_config
|
||||
from sqlalchemy import pool
|
||||
from alembic import context
|
||||
|
||||
# 1. Add your backend folder to the Python path so it can find 'app'
|
||||
sys.path.insert(0, dirname(dirname(abspath(__file__))))
|
||||
|
||||
# 2. Import your Base, Models, and dynamic Database URL
|
||||
from app.database import Base, SQLALCHEMY_DATABASE_URL
|
||||
import app.models
|
||||
|
||||
@@ -20,8 +16,6 @@ config = context.config
|
||||
if config.config_file_name is not None:
|
||||
fileConfig(config.config_file_name)
|
||||
|
||||
# 3. OVERRIDE Alembic's config with your app's actual database URL!
|
||||
config.set_main_option("sqlalchemy.url", SQLALCHEMY_DATABASE_URL)
|
||||
|
||||
# 4. Tell Alembic to look at your models for changes
|
||||
target_metadata = Base.metadata
|
||||
@@ -0,0 +1,27 @@
|
||||
# backend/alembic/versions/60af14f4cc88_force_add_dropped_out.py
|
||||
|
||||
"""force add dropped out
|
||||
|
||||
Revision ID: 60af14f4cc88
|
||||
Revises: eb5be3f1f723
|
||||
Create Date: 2026-08-29 21:22:48.979751
|
||||
|
||||
"""
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = '60af14f4cc88'
|
||||
down_revision: Union[str, Sequence[str], None] = 'eb5be3f1f723'
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
op.add_column('teams', sa.Column('dropped_out', sa.Boolean(), server_default='0', nullable=False))
|
||||
|
||||
def downgrade() -> None:
|
||||
op.drop_column('teams', 'dropped_out')
|
||||
@@ -22,9 +22,9 @@ depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
def upgrade() -> None:
|
||||
"""Upgrade schema."""
|
||||
op.add_column('teams', sa.Column('dropped_out', sa.Boolean(), server_default='0', nullable=False))
|
||||
pass
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
"""Downgrade schema."""
|
||||
op.drop_column('teams', 'dropped_out')
|
||||
pass
|
||||
Reference in new issue
Block a user