Skip to content

Commit be38549

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

File tree

3 files changed

+38
-0
lines changed

3 files changed

+38
-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,32 @@
1+
"""Added l_areas description
2+
3+
Revision ID: c83cc2389a49
4+
Revises: 1fdac7036dd9
5+
Create Date: 2025-01-15 17:41:34.764302
6+
7+
"""
8+
from alembic import op
9+
10+
11+
# revision identifiers, used by Alembic.
12+
revision = 'c83cc2389a49'
13+
down_revision = '1fdac7036dd9'
14+
branch_labels = None
15+
depends_on = None
16+
17+
18+
def upgrade():
19+
op.execute(
20+
"""
21+
ALTER TABLE ref_geo.l_areas
22+
ADD COLUMN description TEXT default NULL;
23+
"""
24+
)
25+
26+
def downgrade():
27+
op.execute(
28+
"""
29+
ALTER TABLE ref_geo.l_areas
30+
DROP COLUMN description;
31+
"""
32+
)

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)