Rilascio di CMS "GIRVAS" del 08.07.2025 nella fase di sviluppo "Voitsy".
Ultime modifiche
- Adeguamento dei nomi di variabili, metodi e proprietà degli oggetti alle regole PSR-1;
- Adeguamento del codice alle regole PSR-12;
- Aggiunta della condizione IF EXISTS alla clausola ALTER TABLE per il costruttore di query SQL;
- Aggiunta della sensibilità alle maiuscole per le colonne selezionate nella clausola SELECT per il costruttore di query SQL;
- Aggiunta di un controllo per verificare se esiste già un gruppo utenti con lo stesso nome tecnico di quello in modifica;
- Aggiunta di un argomento con il tipo di DBMS per l"inizializzazione del costruttore di query;
- Implementazione di un metodo nella classe del kernel di sistema per la corretta verifica delle connessioni HTTPS, inclusa la verifica per ambienti cloud e proxy;
- Implementazione di un metodo nella classe del kernel di sistema per l"inclusione automatica di file (in precedenza l"inclusione non era isolata in un metodo separato);
- Implementazione di un"interfaccia comune per le classi di localizzazione del kernel di sistema, dei moduli e dei temi;
- Implementazione del supporto per DBMS MySQL;
- Aggiunta di un alias per la funzione SQL di aggregazione COUNT() durante la determinazione del numero di record nelle tabelle del database per l"adattamento a diversi DBMS;
- Implementazione di un metodo per ottenere l"URL precedente (Referrer) per la classe del parser dell"URL;
- Correzione di un errore per cui il collector dei feed non poteva effettuare la raccolta a causa della presenza di entità HTML nella descrizione del contenuto;
- Sostituzione del logo del sistema nel template primario del sito con uno nuovo;
- Aggiornamento delle localizzazioni: ru_RU, en_US;
- Refactoring del codice del sistema, dei template primari del sito e del pannello di amministrazione;
- Piccole correzioni stilistiche del template primario del sito;
- Altre correzioni minori;
Rilascio precedente: 0.1.36 Alpha
Adattamento del vecchio database
Le seguenti query SQL aiuteranno ad adattare correttamente il database PostgreSQL generato dal CMS "GIRVAS" prima dell"aggiornamento 0.2.0 Voitsy.
Ridenominazione delle colonne
ALTER TABLE configurations RENAME COLUMN created_unix_timestamp to "createdUnixTimestamp";
ALTER TABLE configurations RENAME COLUMN updated_unix_timestamp to "updatedUnixTimestamp";
ALTER TABLE entries RENAME COLUMN author_id to "authorID";
ALTER TABLE entries RENAME COLUMN category_id to "categoryID";
ALTER TABLE entries RENAME COLUMN created_unix_timestamp to "createdUnixTimestamp";
ALTER TABLE entries RENAME COLUMN updated_unix_timestamp to "updatedUnixTimestamp";
ALTER TABLE entries_categories RENAME COLUMN parent_id to "parentID";
ALTER TABLE entries_categories RENAME COLUMN created_unix_timestamp to "createdUnixTimestamp";
ALTER TABLE entries_categories RENAME COLUMN updated_unix_timestamp to "updatedUnixTimestamp";
ALTER TABLE entries_comments RENAME COLUMN author_id to "authorID";
ALTER TABLE entries_comments RENAME COLUMN entry_id to "entryID";
ALTER TABLE entries_comments RENAME COLUMN created_unix_timestamp to "createdUnixTimestamp";
ALTER TABLE entries_comments RENAME COLUMN updated_unix_timestamp to "updatedUnixTimestamp";
ALTER TABLE entries_samples RENAME COLUMN created_unix_timestamp to "createdUnixTimestamp";
ALTER TABLE entries_samples RENAME COLUMN updated_unix_timestamp to "updatedUnixTimestamp";
ALTER TABLE metrics RENAME COLUMN created_unix_timestamp to "createdUnixTimestamp";
ALTER TABLE metrics RENAME COLUMN updated_unix_timestamp to "updatedUnixTimestamp";
ALTER TABLE pages_static RENAME COLUMN author_id to "authorID";
ALTER TABLE pages_static RENAME COLUMN created_unix_timestamp to "createdUnixTimestamp";
ALTER TABLE pages_static RENAME COLUMN updated_unix_timestamp to "updatedUnixTimestamp";
ALTER TABLE reports RENAME COLUMN created_unix_timestamp to "createdUnixTimestamp";
ALTER TABLE users RENAME COLUMN password_hash to "passwordHash";
ALTER TABLE users RENAME COLUMN security_hash to "securityHash";
ALTER TABLE users RENAME COLUMN email_is_submitted to "emailIsSubmitted";
ALTER TABLE users RENAME COLUMN created_unix_timestamp to "createdUnixTimestamp";
ALTER TABLE users RENAME COLUMN updated_unix_timestamp to updatedUnixTimestamp;
ALTER TABLE users_groups RENAME COLUMN created_unix_timestamp to "createdUnixTimestamp";
ALTER TABLE users_groups RENAME COLUMN updated_unix_timestamp to "updatedUnixTimestamp";
ALTER TABLE users_registration_submits RENAME COLUMN user_id to "userID";
ALTER TABLE users_registration_submits RENAME COLUMN submit_token to "submitToken";
ALTER TABLE users_registration_submits RENAME COLUMN refusal_token to "refusalToken";
ALTER TABLE users_registration_submits RENAME COLUMN created_unix_timestamp to "createdUnixTimestamp";
ALTER TABLE users_sessions RENAME COLUMN user_id to "userID";
ALTER TABLE users_sessions RENAME COLUMN user_ip to "userIP";
ALTER TABLE users_sessions RENAME COLUMN type_id to "typeID";
ALTER TABLE users_sessions RENAME COLUMN created_unix_timestamp to "createdUnixTimestamp";
ALTER TABLE users_sessions RENAME COLUMN updated_unix_timestamp to "updatedUnixTimestamp";
ALTER TABLE web_channels RENAME COLUMN entries_category_id to "entriesCategoryID";
ALTER TABLE web_channels RENAME COLUMN type_id to "typeID";
ALTER TABLE web_channels RENAME COLUMN created_unix_timestamp to "createdUnixTimestamp";
ALTER TABLE web_channels RENAME COLUMN updated_unix_timestamp to "updatedUnixTimestamp";
Ridenominazione delle proprietà degli oggetti JSON nei metadati
UPDATE users
SET metadata = jsonb_set(
metadata,
"{groupID}",
metadata->"group_id"
) ||
jsonb_build_object("metadata", metadata - "group_id");
UPDATE entries
SET metadata = jsonb_set(
metadata,
"{isPublish}",
metadata->"is_publish"
) ||
jsonb_build_object("metadata", metadata - "is_publish");
UPDATE entries
SET metadata = jsonb_set(
metadata,
"{previewURL}",
metadata->"preview_url"
) ||
jsonb_build_object("metadata", metadata - "preview_url");
UPDATE pages_static
SET metadata = jsonb_set(
metadata,
"{isPublish}",
metadata->"is_publish"
) ||
jsonb_build_object("metadata", metadata - "is_publish");
UPDATE pages_static
SET metadata = jsonb_set(
metadata,
"{previewURL}",
metadata->"preview_url"
) ||
jsonb_build_object("metadata", metadata - "preview_url");
UPDATE metrics
SET "data" = jsonb_set(
"data",
"{metrics}",
jsonb_set(
"data"->"metrics",
"{views}",
(
SELECT jsonb_object_agg(
view.key,
jsonb_set(
view.value,
"{URLTransfers}",
(
SELECT jsonb_agg(
jsonb_set(
transfer_elem,
array[transfer_key],
jsonb_set(
transfer_elem->transfer_key,
"{isVisitedNew}",
(transfer_elem->transfer_key)->"is_visited_new"
) - "is_visited_new"
)
)
FROM jsonb_array_elements(view.value->"url_transfers") AS transfer_elem,
jsonb_object_keys(transfer_elem) AS transfer_key
)
) - "url_transfers"
)
FROM jsonb_each("data"->"metrics"->"views") AS view
)
)
)
WHERE "data" @? "$.metrics.views..url_transfers";
Commenti