Skip to content

Commit

Permalink
Change name of table tags to tag (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
margrietpalm authored Nov 26, 2024
1 parent 287b6db commit aae9bfc
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Changelog of threedi-schema
0.228.1 (unreleased)
--------------------

- Rename sqlite table "tags" to "tag"
- Remove indices referring to removed tables in previous migrations
- Remove columns referencing v2 in geometry_column

Expand Down
2 changes: 1 addition & 1 deletion threedi_schema/domain/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ class ExchangeLine(Base):


class Tags(Base):
__tablename__ = "tags"
__tablename__ = "tag"
id = Column(Integer, primary_key=True)
description = Column(Text)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
Column("tags", Text),
Column("distribution", Text)
],
"tags": [
"tag": [
Column("description", Text)
]
}
Expand Down
2 changes: 1 addition & 1 deletion threedi_schema/tests/test_migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ class TestMigration223:
pytestmark = pytest.mark.migration_223
removed_tables = set(['v2_surface', 'v2_surface_parameters', 'v2_surface_map',
'v2_impervious_surface', 'v2_impervious_surface_map'])
added_tables = set(['surface', 'surface_map', 'surface_parameters', 'tags',
added_tables = set(['surface', 'surface_map', 'surface_parameters', 'tag',
'dry_weather_flow', 'dry_weather_flow_map', 'dry_weather_flow_distribution'])

def test_tables(self, schema_ref, schema_upgraded):
Expand Down

0 comments on commit aae9bfc

Please sign in to comment.