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>
这个提交包含在:
XuqmGroup 2026-07-04 02:18:42 +08:00
父节点 efc12762e0
当前提交 00fb02dff4
共有 2 个文件被更改,包括 3 次插入1 次删除

查看文件

@ -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;