mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-24 23:59:45 +02:00
* refactor(frontend): ♻️ rewrite migrations UI * refactor(backend): ♻️ rewrite recipe migrations * remove vue-demi Co-authored-by: hay-kot <hay-kot@pm.me>
14 lines
427 B
Python
14 lines
427 B
Python
from typing import Callable, Optional
|
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
class MigrationAlias(BaseModel):
|
|
"""A datatype used by MigrationBase to pre-process a recipe dictionary to rewrite
|
|
the alias key in the dictionary, if it exists, to the key. If set a `func` attribute
|
|
will be called on the value before assigning the value to the new key
|
|
"""
|
|
|
|
key: str
|
|
alias: str
|
|
func: Optional[Callable] = None
|