GispoCoding / hame-ryhti

HAME regional land use planning database compatible with national Ryhti data model
MIT License
0 stars 0 forks source link

244 add alembic utils #285

Closed msorvoja closed 4 months ago

msorvoja commented 5 months ago

Fix #157, #244, #253.

Adds four types of triggers which fire when

  1. any table in hame schema is updated (or a new row is inserted), modified_at field gets a new timestamp,
  2. any row on plan, plan_regulation or plan_proposition table gets new lifecycle_status --> new row is added into lifecycle_date table.
  3. lifecycle_status on any row in table plan is updated, all plan objects, plan regulations and plan propositions associated with it get the same lifecycle_status.
  4. a new plan object is created, it gets plan_id from the most recent plan (newest by created_at)
msorvoja commented 4 months ago

@Rikuoja I made the requested changes.