manned/indexer/src
Yorhel cd5d2c6a20 Remove encodings from "locales" table + delete incorrect locales
The frontend always stripped off the encodings already, so no point in
keeping that in the DB indices. The full locale was extracted from the
filename, which we still keep, so no information is list.

SQL "migration" script:

  BEGIN;
  CREATE INDEX files_tmp_locale ON files (locale);

  INSERT INTO locales (locale) VALUES ('pl_PL'), ('is_IS'), ('ko_KR');

  WITH obs(id, locale, lang) AS (
    SELECT id, locale, regexp_replace(locale, '^([^.]+)\..+$', '\1') FROM locales WHERE locale LIKE '%.%'
     UNION ALL
    SELECT id, locale, '' FROM locales WHERE locale LIKE 'node%' OR locale = 'common'
  ), rep(old, new) AS (
    SELECT o.id, x.id FROM obs o LEFT JOIN locales x ON x.locale = o.lang
  ), upd AS (
    UPDATE files SET locale = new FROM rep WHERE locale = old
  ) DELETE FROM locales WHERE id IN(SELECT id FROM obs);

  DROP INDEX files_tmp_locale;

  COMMIT;
2024-05-01 17:04:09 +02:00
..
archive.rs indexer: More crate updates + warning fixes + 2018 edition 2021-12-11 14:56:22 +01:00
archread.rs indexer: More crate updates + warning fixes + 2018 edition 2021-12-11 14:56:22 +01:00
main.rs Get rid of package categories 2024-04-28 10:37:04 +02:00
man.rs Remove encodings from "locales" table + delete incorrect locales 2024-05-01 17:04:09 +02:00
open.rs indexer: More crate updates + warning fixes + 2018 edition 2021-12-11 14:56:22 +01:00
pkg.rs Remove encodings from "locales" table + delete incorrect locales 2024-05-01 17:04:09 +02:00
sys_alpine.rs Get rid of package categories 2024-04-28 10:37:04 +02:00
sys_arch.rs indexer: Disable broken dead-package checking for Arch 2024-04-29 10:45:13 +02:00
sys_deb.rs Get rid of package categories 2024-04-28 10:37:04 +02:00
sys_freebsd1.rs Get rid of package categories 2024-04-28 10:37:04 +02:00
sys_freebsd2.rs Get rid of package categories 2024-04-28 10:37:04 +02:00
sys_rpm.rs Get rid of package categories 2024-04-28 10:37:04 +02:00
sys_rpmdir.rs Get rid of package categories 2024-04-28 10:37:04 +02:00