diff options
author | Daimona Eaytoy <daimona.wiki@gmail.com> | 2024-12-12 22:57:31 +0100 |
---|---|---|
committer | Daimona Eaytoy <daimona.wiki@gmail.com> | 2024-12-13 03:12:56 +0100 |
commit | 251f4395865f8a33bcf32c6faa11748a14753492 (patch) | |
tree | 951d03a3860e9e1851cfe8e3c1ee8ea0c4217c29 /maintenance/sqlite/archives/patch-page-drop-page_restrictions.sql | |
parent | 589f6d5a40d7bf65250f174be1318a077733c5f5 (diff) | |
download | mediawikicore-251f4395865f8a33bcf32c6faa11748a14753492.tar.gz mediawikicore-251f4395865f8a33bcf32c6faa11748a14753492.zip |
Move SQL schema and schema changes to new sql/ top-level directory
This is the standard in every extension. DB schema changes are not
maintenance scripts, and therefore there's no apparent reason to have
the two things together, besides historical reasons.
Also, put each DB type in a separate directory, which wasn't the case
for MySQL before. For SQLite and Postgres schema changes, we now
follow the convention (used everywhere else, including the
generateSchemaChangeSql script) of having the DB type as the last part
of the path. This lets us generate schema changes for all DB types at
once, and without specifying the full file path.
Most files are just being renamed, the exceptions being to update
references to the old location (sometimes still referencing tables.sql).
Note that the old path is still referenced in the autogenerated comment
of schema changes SQL files. These will be regenerated in another
commit. Instead, the schema files are done now, because they're covered
by DatabaseIntegrationTest that would otherwise fail.
Bug: T382030
Change-Id: I3b4a614366d0bc629523ac40ce97d001f3b6bcf8
Diffstat (limited to 'maintenance/sqlite/archives/patch-page-drop-page_restrictions.sql')
-rw-r--r-- | maintenance/sqlite/archives/patch-page-drop-page_restrictions.sql | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/maintenance/sqlite/archives/patch-page-drop-page_restrictions.sql b/maintenance/sqlite/archives/patch-page-drop-page_restrictions.sql deleted file mode 100644 index 6b033808ef05..000000000000 --- a/maintenance/sqlite/archives/patch-page-drop-page_restrictions.sql +++ /dev/null @@ -1,21 +0,0 @@ --- This file is automatically generated using maintenance/generateSchemaChangeSql.php. --- Source: maintenance/abstractSchemaChanges/patch-page-drop-page_restrictions.json --- Do not modify this file directly. --- See https://www.mediawiki.org/wiki/Manual:Schema_changes -DROP INDEX page_name_title; -DROP INDEX page_random; -DROP INDEX page_len; -DROP INDEX page_redirect_namespace_len; -CREATE TEMPORARY TABLE /*_*/__temp__page AS -SELECT page_id, page_namespace, page_title, page_is_redirect, page_is_new, page_random, page_touched, page_links_updated, page_latest, page_len, page_content_model, page_lang -FROM /*_*/page; -DROP TABLE /*_*/page; -CREATE TABLE /*_*/page ( page_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, page_namespace INTEGER NOT NULL, page_title BLOB NOT NULL, page_is_redirect SMALLINT UNSIGNED DEFAULT 0 NOT NULL, page_is_new SMALLINT UNSIGNED DEFAULT 0 NOT NULL, page_random DOUBLE PRECISION NOT NULL, page_touched BLOB NOT NULL, page_links_updated BLOB DEFAULT NULL, page_latest INTEGER UNSIGNED NOT NULL, page_len INTEGER UNSIGNED NOT NULL, page_content_model BLOB DEFAULT NULL, page_lang BLOB DEFAULT NULL ); -INSERT INTO /*_*/page ( page_id, page_namespace, page_title, page_is_redirect, page_is_new, page_random, page_touched, page_links_updated, page_latest, page_len, page_content_model, page_lang ) -SELECT page_id, page_namespace, page_title, page_is_redirect, page_is_new, page_random, page_touched, page_links_updated, page_latest, page_len, page_content_model, page_lang -FROM /*_*/__temp__page; -DROP TABLE /*_*/__temp__page; -CREATE UNIQUE INDEX page_name_title ON /*_*/page (page_namespace, page_title); -CREATE INDEX page_random ON /*_*/page (page_random); -CREATE INDEX page_len ON /*_*/page (page_len); -CREATE INDEX page_redirect_namespace_len ON /*_*/page ( page_is_redirect, page_namespace, page_len );
\ No newline at end of file |