Fix settings data

This commit is contained in:
Jamie Curnow
2021-07-26 13:50:44 +10:00
parent 93721ef2d8
commit 2326a95d2a
5 changed files with 18 additions and 11 deletions

View File

@@ -2,11 +2,7 @@
"type": "object",
"description": "SettingObject",
"additionalProperties": false,
"required": [
"id",
"name",
"value"
],
"required": ["id", "name", "value"],
"properties": {
"id": {
"type": "integer",
@@ -25,6 +21,11 @@
"minLength": 2,
"maxLength": 100
},
"description": {
"type": "string",
"minLength": 0,
"maxLength": 100
},
"value": {
"oneOf": [
{
@@ -38,8 +39,11 @@
},
{
"type": "integer"
},
{
"type": "string"
}
]
}
}
}
}

View File

@@ -32,7 +32,7 @@ CREATE TABLE IF NOT EXISTS `setting`
created_on INTEGER NOT NULL DEFAULT 0,
modified_on INTEGER NOT NULL DEFAULT 0,
name TEXT NOT NULL,
description TEXT NOT NULL,
description TEXT NOT NULL DEFAULT "",
value TEXT NOT NULL,
UNIQUE (name)
);

View File

@@ -11,8 +11,8 @@ INSERT INTO `setting` (
strftime('%s', 'now'),
strftime('%s', 'now'),
"error-reporting",
"If enabled, any application errors are reported to Sentry. Sensitive information is not sent. All information sent is also private.",
"true"
"If enabled, any application errors are reported to Sentry. Sensitive information is not sent.",
"true" -- remember this is json
);
-- Default site
@@ -27,7 +27,7 @@ INSERT INTO `setting` (
strftime('%s', 'now'),
"default-site",
"What to show users who hit your Nginx server by default",
"welcome"
'"welcome"' -- remember this is json
);
-- Default Certificate Authorities