feat(sync): 跨实例同步第1轮——同步功能表、InstanceSyncedOptions 类型与实例元数据字段
Sync source to CNB / Sync Git ref (push) Has been cancelled
Sync source to CNB / Sync Git ref (push) Has been cancelled
- 新增 4 个 migration:同步功能表/instance_servers 扩展/synced_pack_selection/禁用发现选项 - 新增 InstanceSyncedOptions 类型(per-instance 同步开关) - InstanceMetadata 增加 synced_options 字段并在 3 个查询点填充 - instance_rows 新增 get_instance_synced_options - 前端 GameInstance 增加 synced_options 类型
This commit is contained in:
1 parent
91e63fdb2c
commit
5a289c3a15
10 files changed
+302
-6
No files matched your search
@@ -0,0 +1,27 @@
|
||||
-- Axolotl stores managed server-project entries alongside the local additions
|
||||
-- that are composed with the launcher-wide multiplayer server list. Extend
|
||||
-- the original sync table constraint without changing the already-applied
|
||||
-- instance-sync migration.
|
||||
CREATE TABLE instance_servers_new (
|
||||
instance_id TEXT NOT NULL,
|
||||
id TEXT NOT NULL,
|
||||
source TEXT NOT NULL CHECK (
|
||||
source IN ('modpack', 'linked_server_project', 'local_desynced')
|
||||
),
|
||||
excluded_synced_server_id TEXT,
|
||||
nbt BLOB NOT NULL,
|
||||
position INTEGER NOT NULL CHECK (position >= 0),
|
||||
PRIMARY KEY (instance_id, id),
|
||||
UNIQUE (instance_id, position),
|
||||
FOREIGN KEY (instance_id) REFERENCES instances (id) ON DELETE CASCADE,
|
||||
FOREIGN KEY (excluded_synced_server_id)
|
||||
REFERENCES synced_servers (id) ON DELETE SET NULL
|
||||
);
|
||||
|
||||
INSERT INTO instance_servers_new
|
||||
(instance_id, id, source, excluded_synced_server_id, nbt, position)
|
||||
SELECT instance_id, id, source, excluded_synced_server_id, nbt, position
|
||||
FROM instance_servers;
|
||||
|
||||
DROP TABLE instance_servers;
|
||||
ALTER TABLE instance_servers_new RENAME TO instance_servers;
|
||||
Reference in new issue
Block a user