`name`VARCHAR(45)NOTNULLDEFAULT'Untitled'COMMENT'Name of the update addon.',
`description`VARCHAR(1000)NULL,
`addon_zip_url`VARCHAR(256)NOTNULLCOMMENT'Addon zip which is extracted on top of the client update base.',
`server_zip_url`VARCHAR(256)NULLCOMMENT'Addon zip which is extracted on top of the server update base. (optional)',
`date`DATETIMENOTNULLDEFAULTCURRENT_TIMESTAMPCOMMENT'Date the addon was created.',
PRIMARYKEY(`addon_id`))
COMMENT='Update addons are additional resources which are combined with the base game version (from a buildbot) to create the final binary a server will update to and deploy.';
CREATETABLE`fso_update_branch`(
`branch_id`INTNOTNULLAUTO_INCREMENT,
`version_format`VARCHAR(128)NOTNULLDEFAULT'dev/update-#'COMMENT'Format string for version name. # is version number, $ is commit number (if available).',
`last_version_number`INTNOTNULLDEFAULT0COMMENT'The last version number. This is incremented when a new build is generated for this branch.',
`current_dist_id`INTNULLCOMMENT'The current distribution in fso_updates.',
`addon_id`INTNULLCOMMENT'(Optional) The addon to merge into the downloaded binary.',
`base_build_url`VARCHAR(256)NOTNULLCOMMENT'URL for client binary to base updates off of. If \"teamcity\" is enabled, the client AND server binary is found within the grouped artifacts zip this link points to.',
`base_server_build_url`VARCHAR(256)NULLCOMMENT'(Optional) URL for server binary. Required for zip mode, not for teamcity.',
`build_mode`ENUM('zip','teamcity')NOTNULLDEFAULT'zip'COMMENT'The mode to use when obtaining binaries.',
COMMENT='Update branches for the server. Each branch points to a source to download new zips from, and can optionally point to an update addon to be merged into it. This also generates a version name.';
CREATETABLE`fso_updates`(
`update_id`INTNOTNULLAUTO_INCREMENTCOMMENT'The ID of this update.',
`version_name`VARCHAR(128)NOTNULLCOMMENT'The name of this version, generated from the format in the branch.',
`addon_id`INTNULLCOMMENT'The addon pack this update includes.',
`branch_id`INTNOTNULLCOMMENT'The branch this update was generated off of.',
`full_zip`VARCHAR(256)NOTNULLCOMMENT'URL for the zip file containing the full client distribution. Should be used for new users and fixing failed updates.',
`incremental_zip`VARCHAR(256)NULLCOMMENT'A zip containing the files that were added or modified since the last update (see last_update_id)',
`manfest_url`VARCHAR(256)NULLCOMMENT'Manifest file for the incremental zip.',
`server_zip`VARCHAR(256)NULLCOMMENT'URL to a zip containing the server distribution. Downloaded and applied by the Watchdog on server restart. (may also be used for rollbacks)',
`last_update_id`INTNULLCOMMENT'The update that the incremental update was created from.',
`flags`INTNOTNULLDEFAULT0COMMENT'1 - db-init required\n2 - force non-incremental\n4 - incremental on protected\n8 - rolled back',
`date`DATETIMENOTNULLDEFAULTCURRENT_TIMESTAMPCOMMENT'The date the update was generated at.',
`publish_date`DATETIMENULLCOMMENT'The date the update was published at.',
`deploy_after`DATETIMENULLCOMMENT'(Optional) The time after which to deploy this update to the server on restart. When an entry with this is set and the server shuts down, it starts the update process and sets this to NULL.',
PRIMARYKEY(`update_id`),
INDEX`fso_updates_addon_idx`(`addon_id`ASC),
INDEX`fso_updates_branch_fk_idx`(`branch_id`ASC),
CONSTRAINT`fso_updates_addon_fk`
FOREIGNKEY(`addon_id`)
REFERENCES`fso_update_addons`(`addon_id`)
ONDELETESETNULL
ONUPDATECASCADE,
CONSTRAINT`fso_updates_branch_fk`
FOREIGNKEY(`branch_id`)
REFERENCES`fso_update_branch`(`branch_id`)
ONDELETECASCADE
ONUPDATECASCADE)
COMMENT='Updates generated by the server for branches. Should link to all published assets, and track incremental update paths. When deploy_after is set, the update will become the main update for that branch after the time elapses (on server restart).';
CHANGECOLUMN`full_zip``full_zip`VARCHAR(256)NULLDEFAULTNULLCOMMENT'URL for the zip file containing the full client distribution. Should be used for new users and fixing failed updates.',
CHANGECOLUMN`manfest_url``manifest_url`VARCHAR(256)NULLDEFAULTNULLCOMMENT'Manifest file for the incremental zip.';