Alan Guo Xiang Tan 167bc8cee9
FIX: Ensure that custom header links migration do not fail validation (#55)
This commit is a follow up to 73747938bde3c2d3f6f68350c48a320364be1b04
where the migration will fail because the objects created by the
migration will end up failing to save because the objects will fail the
validation given the new schema. This commit updates the migration to
ensure that we do not end up with invalid objects.
2024-04-26 12:57:46 +08:00

52 lines
908 B
YAML

custom_header_links:
type: objects
default: []
schema:
name: "link"
identifier: text
properties:
text:
type: string
required: true
validations:
min_length: 1
max_length: 100
title:
type: string
validations:
min_length: 1
max_length: 1000
url:
type: string
required: true
validations:
min_length: 1
max_length: 2048
url: true
view:
type: enum
choices:
- vdm
- vdo
- vmo
target:
type: enum
choices:
- blank
- self
hide_on_scroll:
type: enum
choices:
- remove
- keep
default: keep
locale:
type: string
links_position:
default: right
type: enum
choices:
- right
- left