As discussed in I7d42aae434852a56b6f8dd559d8a5f3bce416021 primary keys are needed to perform various schema changes on the site_stats table. This patch aims to introduce primary keys for all supported dbms. The respective *.sql patch files were tested locally against Postgres and SQL Server 2016. Please note that neither the patch file for Oracle DB nor the mediawiki upgrade through update.php was tested. Bug: T56888 Change-Id: Id10e221f0dc120bc09afc22596fd1dbecbf6a61d
3 lines
171 B
SQL
3 lines
171 B
SQL
ALTER TABLE site_stats DROP CONSTRAINT site_stats_ss_row_id_key;
|
|
ALTER TABLE site_stats ADD PRIMARY KEY (ss_row_id);
|
|
ALTER TABLE site_stats ALTER ss_row_id SET DEFAULT 0;
|