refactor: consolidate header branding migrations

This commit is contained in:
ajnart committed 2026-08-24 09:39:54 +02:00
1 parent 12cad9d3fb
commit 75bf432859
15 files changed
+87 -8306

No files matched your search

@@ -1,2 +1,4 @@
ALTER TABLE `user` ADD `header_preferences` text DEFAULT ('{"version":3,"visible":true,"searchDisplay":"input","zones":{"left":[{"type":"builtin","id":"logo"}],"center":[{"type":"builtin","id":"search"}],"right":[{"type":"builtin","id":"boardEdit"},{"type":"builtin","id":"boardSettings"},{"type":"builtin","id":"user"}]}}') NOT NULL;
--> statement-breakpoint
INSERT IGNORE INTO `serverSetting` (`setting_key`, `value`)
VALUES ('branding', '{"json":{"appName":"Homarr","greeting":"","logoImageUrl":null,"faviconImageUrl":null,"primaryColor":"#fa5252","secondaryColor":"#fd7e14","lockPrimaryColor":false,"signInBackgroundImageUrl":null,"signInBackgroundOverlay":0.55,"authBranding":{"showAppName":true,"showLogo":true,"showGreeting":true},"defaultRadius":"md"}}');
@@ -1 +0,0 @@
ALTER TABLE `user` ADD `header_preferences` text DEFAULT ('{"version":3,"visible":true,"searchDisplay":"input","zones":{"left":[{"type":"builtin","id":"logo"}],"center":[{"type":"builtin","id":"search"}],"right":[{"type":"builtin","id":"boardEdit"},{"type":"builtin","id":"boardSettings"},{"type":"builtin","id":"user"}]}}') NOT NULL;
@@ -1,7 +1,7 @@
{
"version": "5",
"dialect": "mysql",
"id": "d5db09f8-bda5-496d-a0c3-b7a4655252d5",
"id": "ec84f043-0abe-4b32-a9ea-7bfe6e790d6a",
"prevId": "5d4a439e-2e7b-4845-a6b4-f24ca5b95408",
"tables": {
"account": {
@@ -2492,42 +2492,6 @@
"uniqueConstraints": {},
"checkConstraint": {}
},
"trusted_certificate_hostname": {
"name": "trusted_certificate_hostname",
"columns": {
"hostname": {
"name": "hostname",
"type": "varchar(256)",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"thumbprint": {
"name": "thumbprint",
"type": "varchar(128)",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"certificate": {
"name": "certificate",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {
"trusted_certificate_hostname_hostname_thumbprint_pk": {
"name": "trusted_certificate_hostname_hostname_thumbprint_pk",
"columns": ["hostname", "thumbprint"]
}
},
"uniqueConstraints": {},
"checkConstraint": {}
},
"user": {
"name": "user",
"columns": {
@@ -2802,6 +2766,42 @@
},
"uniqueConstraints": {},
"checkConstraint": {}
},
"trusted_certificate_hostname": {
"name": "trusted_certificate_hostname",
"columns": {
"hostname": {
"name": "hostname",
"type": "varchar(256)",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"thumbprint": {
"name": "thumbprint",
"type": "varchar(128)",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"certificate": {
"name": "certificate",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {
"trusted_certificate_hostname_hostname_thumbprint_pk": {
"name": "trusted_certificate_hostname_hostname_thumbprint_pk",
"columns": ["hostname", "thumbprint"]
}
},
"uniqueConstraints": {},
"checkConstraint": {}
}
},
"views": {},
File diff suppressed because it is too large. Load diff
@@ -341,15 +341,8 @@
{
"idx": 48,
"version": "5",
"when": 1787496042445,
"tag": "0048_add_user_header_preferences",
"breakpoints": true
},
{
"idx": 49,
"version": "5",
"when": 1787496053718,
"tag": "0049_add_server_branding_settings",
"when": 1787556966768,
"tag": "0048_add_header_preferences_and_branding",
"breakpoints": true
}
]
@@ -1,3 +1,5 @@
ALTER TABLE "user" ADD COLUMN "header_preferences" text DEFAULT '{"version":3,"visible":true,"searchDisplay":"input","zones":{"left":[{"type":"builtin","id":"logo"}],"center":[{"type":"builtin","id":"search"}],"right":[{"type":"builtin","id":"boardEdit"},{"type":"builtin","id":"boardSettings"},{"type":"builtin","id":"user"}]}}' NOT NULL;
--> statement-breakpoint
INSERT INTO "serverSetting" ("setting_key", "value")
VALUES ('branding', '{"json":{"appName":"Homarr","greeting":"","logoImageUrl":null,"faviconImageUrl":null,"primaryColor":"#fa5252","secondaryColor":"#fd7e14","lockPrimaryColor":false,"signInBackgroundImageUrl":null,"signInBackgroundOverlay":0.55,"authBranding":{"showAppName":true,"showLogo":true,"showGreeting":true},"defaultRadius":"md"}}')
ON CONFLICT ("setting_key") DO NOTHING;
@@ -1 +0,0 @@
ALTER TABLE "user" ADD COLUMN "header_preferences" text DEFAULT '{"version":3,"visible":true,"searchDisplay":"input","zones":{"left":[{"type":"builtin","id":"logo"}],"center":[{"type":"builtin","id":"search"}],"right":[{"type":"builtin","id":"boardEdit"},{"type":"builtin","id":"boardSettings"},{"type":"builtin","id":"user"}]}}' NOT NULL;
@@ -1,5 +1,5 @@
{
"id": "dec7f43d-ca63-4b3d-af66-0d94e4f06a80",
"id": "a1398ea3-5939-47f7-840c-2b9b693a2b0c",
"prevId": "ab2696e9-42d1-4aa0-bc60-b6d9fc50a7dc",
"version": "7",
"dialect": "postgresql",
@@ -2373,42 +2373,6 @@
"checkConstraints": {},
"isRLSEnabled": false
},
"public.trusted_certificate_hostname": {
"name": "trusted_certificate_hostname",
"schema": "",
"columns": {
"hostname": {
"name": "hostname",
"type": "varchar(256)",
"primaryKey": false,
"notNull": true
},
"thumbprint": {
"name": "thumbprint",
"type": "varchar(128)",
"primaryKey": false,
"notNull": true
},
"certificate": {
"name": "certificate",
"type": "text",
"primaryKey": false,
"notNull": true
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {
"trusted_certificate_hostname_hostname_thumbprint_pk": {
"name": "trusted_certificate_hostname_hostname_thumbprint_pk",
"columns": ["hostname", "thumbprint"]
}
},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.user": {
"name": "user",
"schema": "",
@@ -2661,6 +2625,42 @@
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.trusted_certificate_hostname": {
"name": "trusted_certificate_hostname",
"schema": "",
"columns": {
"hostname": {
"name": "hostname",
"type": "varchar(256)",
"primaryKey": false,
"notNull": true
},
"thumbprint": {
"name": "thumbprint",
"type": "varchar(128)",
"primaryKey": false,
"notNull": true
},
"certificate": {
"name": "certificate",
"type": "text",
"primaryKey": false,
"notNull": true
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {
"trusted_certificate_hostname_hostname_thumbprint_pk": {
"name": "trusted_certificate_hostname_hostname_thumbprint_pk",
"columns": ["hostname", "thumbprint"]
}
},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
}
},
"enums": {},
File diff suppressed because it is too large. Load diff
@@ -103,15 +103,8 @@
{
"idx": 14,
"version": "7",
"when": 1787496042486,
"tag": "0014_add_user_header_preferences",
"breakpoints": true
},
{
"idx": 15,
"version": "7",
"when": 1787496053659,
"tag": "0015_add_server_branding_settings",
"when": 1787556966592,
"tag": "0014_add_header_preferences_and_branding",
"breakpoints": true
}
]
@@ -1,3 +1,5 @@
ALTER TABLE `user` ADD `header_preferences` text DEFAULT '{"version":3,"visible":true,"searchDisplay":"input","zones":{"left":[{"type":"builtin","id":"logo"}],"center":[{"type":"builtin","id":"search"}],"right":[{"type":"builtin","id":"boardEdit"},{"type":"builtin","id":"boardSettings"},{"type":"builtin","id":"user"}]}}' NOT NULL;
--> statement-breakpoint
INSERT INTO `serverSetting` (`setting_key`, `value`)
VALUES ('branding', '{"json":{"appName":"Homarr","greeting":"","logoImageUrl":null,"faviconImageUrl":null,"primaryColor":"#fa5252","secondaryColor":"#fd7e14","lockPrimaryColor":false,"signInBackgroundImageUrl":null,"signInBackgroundOverlay":0.55,"authBranding":{"showAppName":true,"showLogo":true,"showGreeting":true},"defaultRadius":"md"}}')
ON CONFLICT (`setting_key`) DO NOTHING;
@@ -1 +0,0 @@
ALTER TABLE `user` ADD `header_preferences` text DEFAULT '{"version":3,"visible":true,"searchDisplay":"input","zones":{"left":[{"type":"builtin","id":"logo"}],"center":[{"type":"builtin","id":"search"}],"right":[{"type":"builtin","id":"boardEdit"},{"type":"builtin","id":"boardSettings"},{"type":"builtin","id":"user"}]}}' NOT NULL;
@@ -1,7 +1,7 @@
{
"version": "6",
"dialect": "sqlite",
"id": "8b2aca95-c639-49e9-a3e4-e9d61432a9fe",
"id": "efc119da-0745-4f07-a783-0dd19f24cb4f",
"prevId": "5114a19e-3b78-482a-a68b-69874a05ee76",
"tables": {
"account": {
File diff suppressed because it is too large. Load diff
@@ -327,15 +327,8 @@
{
"idx": 46,
"version": "6",
"when": 1787496042447,
"tag": "0046_add_user_header_preferences",
"breakpoints": true
},
{
"idx": 47,
"version": "6",
"when": 1787496053654,
"tag": "0047_add_server_branding_settings",
"when": 1787556956665,
"tag": "0046_add_header_preferences_and_branding",
"breakpoints": true
}
]