The site stats table holds a bunch of metric fields, two of which are of data type "bigint unsigned", 3 are "bigint" (signed) and one is int (signed). Also the default values differ widely: It is 0 on the "unsigned" fields and the "int" field, but -1 on the three others. This patch makes all of this more consistent: Set all fields (except the ss_row_id, which isn't changed) data type to "bigint unsigned". Also set NULL as the default value for all those fields. Obviously -1 isn't a possible default value any more. Also, 0 can easily be mistaken for a real value (e.g. ss_active_users=0 --> "there is nobody active on this wiki"). NULL, by it's definition, is the value of choice for a value to insert into fields of which we don't know a correct value. The respective patch files were tested locally against MySql, Sqlite, Postgres and SQL Server 2016. Neither oracle nor the upgrade with update.php was tested. Bug: T56888 Change-Id: I7d42aae434852a56b6f8dd559d8a5f3bce416021 |
||
|---|---|---|
| .. | ||
| patch-actor-table.sql | ||
| patch-add_interwiki.sql | ||
| patch-bot_passwords.sql | ||
| patch-category.sql | ||
| patch-categorylinks-better-collation.sql | ||
| patch-change_tag.sql | ||
| patch-comment-table.sql | ||
| patch-content-table.sql | ||
| patch-content_models-table.sql | ||
| patch-ip_changes.sql | ||
| patch-iwlinks.sql | ||
| patch-kill-iwl_prefix.sql | ||
| patch-l10n_cache.sql | ||
| patch-log_search.sql | ||
| patch-module_deps.sql | ||
| patch-page.sql | ||
| patch-page_deleted.sql | ||
| patch-page_props.sql | ||
| patch-page_restrictions.sql | ||
| patch-profiling.sql | ||
| patch-protected_titles.sql | ||
| patch-querycachetwo.sql | ||
| patch-rc_cur_id-not-null.sql | ||
| patch-redirect.sql | ||
| patch-remove-archive2.sql | ||
| patch-rename-iwl_prefix.sql | ||
| patch-revision_rev_user_fkey.sql | ||
| patch-site_stats-modify.sql | ||
| patch-site_stats-pk.sql | ||
| patch-sites.sql | ||
| patch-slot_roles-table.sql | ||
| patch-slots-table.sql | ||
| patch-tag_summary.sql | ||
| patch-testrun.sql | ||
| patch-textsearch_bug66650.sql | ||
| patch-ts2pagetitle.sql | ||
| patch-tsearch2funcs.sql | ||
| patch-update_sequences.sql | ||
| patch-updatelog.sql | ||
| patch-uploadstash.sql | ||
| patch-uploadstash_sequence.sql | ||
| patch-user_former_groups.sql | ||
| patch-user_properties.sql | ||
| patch-valid_tag.sql | ||