Skip to content

Commit a0f0ce0

Browse files
committed
feat: add description column on l_areas
1 parent c21eb14 commit a0f0ce0

File tree

3 files changed

+41
-0
lines changed

3 files changed

+41
-0
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
CHANGELOG
22
=========
33

4+
1.5.5 (XXXX-XX-XX)
5+
------------------
6+
7+
- Ajout d'une colonne description dans la table l_areas
8+
49
1.5.4 (2024-10-23)
510
-----------------------------
611

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
"""Added l_areas description
2+
3+
Revision ID: 31ca7fd0d2ea
4+
Revises: c83cc2389a49
5+
Create Date: 2025-01-16 12:29:32.550025
6+
7+
"""
8+
9+
from alembic import op
10+
import sqlalchemy as sa
11+
12+
13+
# revision identifiers, used by Alembic.
14+
revision = '31ca7fd0d2ea'
15+
down_revision = 'c83cc2389a49'
16+
branch_labels = None
17+
depends_on = None
18+
19+
20+
def upgrade():
21+
op.execute(
22+
"""
23+
ALTER TABLE ref_geo.l_areas
24+
ADD COLUMN description TEXT default NULL;
25+
"""
26+
)
27+
28+
29+
def downgrade():
30+
op.execute(
31+
"""
32+
ALTER TABLE ref_geo.l_areas
33+
DROP COLUMN description;
34+
"""
35+
)

src/ref_geo/models.py

+1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ class LAreas(db.Model):
6363
meta_create_date = db.Column(db.DateTime, default=datetime.now)
6464
meta_update_date = db.Column(db.DateTime, default=datetime.now, onupdate=datetime.now)
6565
area_type = db.relationship("BibAreasTypes", lazy="select")
66+
description = db.Column(db.UnicodeText)
6667
parent_areas = db.relationship(
6768
"LAreas",
6869
secondary=cor_areas,

0 commit comments

Comments
 (0)