Compare commits
No commits in common. "4bc556aec55d4dd8eddc13187ff9ed4b2c06f460" and "d741a882997652e22ee4d546af96e8f6cf35131b" have entirely different histories.
4bc556aec5
...
d741a88299
6 changed files with 18 additions and 45 deletions
|
|
@ -5,12 +5,6 @@ All notable changes to WuttaFarm will be documented in this file.
|
|||
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
||||
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## v0.4.1 (2026-02-17)
|
||||
|
||||
### Fix
|
||||
|
||||
- remove `AnimalType.changed` column
|
||||
|
||||
## v0.4.0 (2026-02-17)
|
||||
|
||||
### Feat
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ build-backend = "hatchling.build"
|
|||
|
||||
[project]
|
||||
name = "WuttaFarm"
|
||||
version = "0.4.1"
|
||||
version = "0.4.0"
|
||||
description = "Web app to integrate with and extend farmOS"
|
||||
readme = "README.md"
|
||||
authors = [
|
||||
|
|
|
|||
|
|
@ -1,37 +0,0 @@
|
|||
"""remove AnimalType.changed
|
||||
|
||||
Revision ID: b8cd4a8f981f
|
||||
Revises: aecfd9175624
|
||||
Create Date: 2026-02-17 18:11:06.110003
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
import wuttjamaican.db.util
|
||||
from sqlalchemy.dialects import postgresql
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "b8cd4a8f981f"
|
||||
down_revision: Union[str, None] = "aecfd9175624"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
|
||||
# animal_type
|
||||
op.drop_column("animal_type", "changed")
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
|
||||
# animal_type
|
||||
op.add_column(
|
||||
"animal_type",
|
||||
sa.Column(
|
||||
"changed", postgresql.TIMESTAMP(), autoincrement=False, nullable=True
|
||||
),
|
||||
)
|
||||
|
|
@ -37,7 +37,11 @@ class AnimalType(model.Base):
|
|||
"""
|
||||
|
||||
__tablename__ = "animal_type"
|
||||
__versioned__ = {}
|
||||
__versioned__ = {
|
||||
"exclude": [
|
||||
"changed",
|
||||
],
|
||||
}
|
||||
__wutta_hint__ = {
|
||||
"model_title": "Animal Type",
|
||||
"model_title_plural": "Animal Types",
|
||||
|
|
@ -62,6 +66,14 @@ class AnimalType(model.Base):
|
|||
""",
|
||||
)
|
||||
|
||||
changed = sa.Column(
|
||||
sa.DateTime(),
|
||||
nullable=True,
|
||||
doc="""
|
||||
When the animal type was last changed, according to farmOS.
|
||||
""",
|
||||
)
|
||||
|
||||
farmos_uuid = sa.Column(
|
||||
model.UUID(),
|
||||
nullable=True,
|
||||
|
|
|
|||
|
|
@ -412,6 +412,7 @@ class AnimalTypeImporter(FromFarmOS, ToWutta):
|
|||
"drupal_id",
|
||||
"name",
|
||||
"description",
|
||||
"changed",
|
||||
]
|
||||
|
||||
def get_source_objects(self):
|
||||
|
|
@ -426,6 +427,7 @@ class AnimalTypeImporter(FromFarmOS, ToWutta):
|
|||
"drupal_id": animal_type["attributes"]["drupal_internal__tid"],
|
||||
"name": animal_type["attributes"]["name"],
|
||||
"description": animal_type["attributes"]["description"],
|
||||
"changed": self.normalize_datetime(animal_type["attributes"]["changed"]),
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ class AnimalTypeView(AssetTypeMasterView):
|
|||
grid_columns = [
|
||||
"name",
|
||||
"description",
|
||||
"changed",
|
||||
]
|
||||
|
||||
sort_defaults = "name"
|
||||
|
|
@ -56,6 +57,7 @@ class AnimalTypeView(AssetTypeMasterView):
|
|||
form_fields = [
|
||||
"name",
|
||||
"description",
|
||||
"changed",
|
||||
"farmos_uuid",
|
||||
"drupal_id",
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue