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

feat: add description column on l_areas #35

Merged
merged 1 commit into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
CHANGELOG
=========

1.5.5 (XXXX-XX-XX)
------------------

- Ajout d'une colonne `description` dans la table `l_areas` (#35 par @juggler31)

1.5.4 (2024-10-23)
-----------------------------

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
"""Added l_areas description

Revision ID: 31ca7fd0d2ea
Revises: 1fdac7036dd9
Create Date: 2025-01-16 12:29:32.550025

"""

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = "1ca7fd0d2ea"
down_revision = "1fdac7036dd9"
branch_labels = None
depends_on = None


def upgrade():
op.add_column(
table_name="l_areas",
schema="ref_geo",
column=sa.Column("description", sa.UnicodeText(), server_default=None),
)


def downgrade():
op.drop_column(table_name="l_areas", column_name="description", schema="ref_geo")
1 change: 1 addition & 0 deletions src/ref_geo/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class LAreas(db.Model):
enable = db.Column(db.Boolean, nullable=False, default=True)
meta_create_date = db.Column(db.DateTime, default=datetime.now)
meta_update_date = db.Column(db.DateTime, default=datetime.now, onupdate=datetime.now)
description = db.Column(db.UnicodeText)
area_type = db.relationship("BibAreasTypes", lazy="select")
parent_areas = db.relationship(
"LAreas",
Expand Down
Loading