fix(file-service): add Flyway migration for pinned column, fix production crash
file-service uses ddl-auto=validate (Flyway-managed schema), not auto-DDL — the previous commit added a pinned field to FileEntity with no matching migration, so Hibernate schema validation failed at startup and crash-looped the service in production. Add V2__add_pinned.sql to actually create the column. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
这个提交包含在:
父节点
efc12762e0
当前提交
00fb02dff4
@ -46,7 +46,7 @@ public class FileEntity {
|
||||
* services (e.g. update-service) for files that must stay downloadable indefinitely,
|
||||
* such as APK packages, even if nobody re-downloads them for a long time.
|
||||
*/
|
||||
@Column(name = "pinned", nullable = false)
|
||||
@Column(name = "pinned", nullable = false, columnDefinition = "TINYINT(1) NOT NULL DEFAULT 0")
|
||||
private boolean pinned;
|
||||
|
||||
public String getId() { return id; }
|
||||
|
||||
@ -0,0 +1,2 @@
|
||||
ALTER TABLE file_record
|
||||
ADD COLUMN pinned TINYINT(1) NOT NULL DEFAULT 0;
|
||||
正在加载...
在新工单中引用
屏蔽一个用户