Skip to content

Commit 244b330

Browse files
committed
combine db migration scripts into one
1 parent 65c3940 commit 244b330

File tree

4 files changed

+8
-109
lines changed

4 files changed

+8
-109
lines changed

migrations/versions/a4cb8572c296_add_translated_spatial_to_dataset.py

Lines changed: 0 additions & 33 deletions
This file was deleted.

migrations/versions/b4cbb5a8dfef_popularity_default_zero.py

Lines changed: 0 additions & 35 deletions
This file was deleted.

migrations/versions/c6db3bc6a5f5_popularity_integer.py

Lines changed: 0 additions & 38 deletions
This file was deleted.

migrations/versions/d2a064c40061_create_dataset_table.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Create dataset table
22
3-
Revision ID: d2a064c40061
3+
Revision ID: c6db3bc6a5f5
44
Revises: 1c80316df048
55
Create Date: 2025-11-21 15:30:00.000000
66
@@ -11,7 +11,7 @@
1111
from sqlalchemy.dialects import postgresql
1212

1313
# revision identifiers, used by Alembic.
14-
revision = "d2a064c40061"
14+
revision = "c6db3bc6a5f5"
1515
down_revision = "1c80316df048"
1616
branch_labels = None
1717
depends_on = None
@@ -25,8 +25,13 @@ def upgrade():
2525
sa.Column("organization_id", sa.String(length=36), nullable=False),
2626
sa.Column("harvest_source_id", sa.String(length=36), nullable=False),
2727
sa.Column("harvest_record_id", sa.String(length=36), nullable=False),
28-
sa.Column("popularity", sa.Numeric(), nullable=True),
28+
sa.Column("popularity", sa.Integer(), server_default="0", nullable=True),
2929
sa.Column("last_harvested_date", sa.DateTime(), nullable=True),
30+
sa.Column(
31+
"translated_spatial",
32+
postgresql.JSONB(astext_type=sa.Text()),
33+
nullable=True,
34+
),
3035
sa.Column("id", sa.String(length=36), nullable=False),
3136
sa.ForeignKeyConstraint(
3237
["organization_id"], ["organization.id"], ondelete="CASCADE"

0 commit comments

Comments
 (0)