fix: V9 迁移将 sites.name 改为可空,多名称只用 namesJson
This commit is contained in:
@@ -262,7 +262,6 @@ public class SiteServiceImpl implements SiteService {
|
||||
Site existing = siteMapper.selectBySiteId(entry.getSiteId());
|
||||
Site site;
|
||||
if (existing != null) {
|
||||
if (names != null && !names.isEmpty()) existing.setName(names.get(0));
|
||||
existing.setNamesJson(toJsonArray(names));
|
||||
existing.setUrlsJson(toJsonArray(urls));
|
||||
if (notes != null && !notes.isBlank()) existing.setNotes(notes);
|
||||
@@ -279,7 +278,6 @@ public class SiteServiceImpl implements SiteService {
|
||||
} else {
|
||||
site = new Site();
|
||||
site.setSiteId(entry.getSiteId());
|
||||
site.setName(names != null && !names.isEmpty() ? names.get(0) : entry.getSiteId());
|
||||
site.setNamesJson(toJsonArray(names));
|
||||
site.setUrlsJson(toJsonArray(urls));
|
||||
site.setNotes(notes);
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
-- PAR Flyway V9: name 列改为可空(多名称已用 namesJson 存储)
|
||||
ALTER TABLE sites MODIFY COLUMN name VARCHAR(200) NULL;
|
||||
Reference in New Issue
Block a user