Skip to content

Commit

Permalink
Apply php-cs-fixer changes
Browse files Browse the repository at this point in the history
  • Loading branch information
alxndr-w authored and github-actions[bot] committed Jul 16, 2024
1 parent e45d643 commit bb3a055
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
9 changes: 4 additions & 5 deletions install.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace FriendsOfRedaxo\Neues;

use rex;
use rex_addon;
use rex_config;
use rex_file;
Expand All @@ -15,15 +16,13 @@
if (rex_addon::get('yform') && rex_addon::get('yform')->isAvailable()) {
rex_yform_manager_table_api::importTablesets(rex_file::get(__DIR__ . '/install/tableset.json'));


// Vorhandene leere UUID-Felder aktualisieren
$sql = rex_sql::factory();
$sql->setQuery('UPDATE ' . \rex::getTable('neues_author') . ' SET uuid = uuid() WHERE uuid IS NULL OR uuid = ""');
$sql->setQuery('UPDATE ' . \rex::getTable('neues_category') . ' SET uuid = uuid() WHERE uuid IS NULL OR uuid = ""');
$sql->setQuery('UPDATE ' . \rex::getTable('neues_entry') . ' SET uuid = uuid() WHERE uuid IS NULL OR uuid = ""');
$sql->setQuery('UPDATE ' . rex::getTable('neues_author') . ' SET uuid = uuid() WHERE uuid IS NULL OR uuid = ""');
$sql->setQuery('UPDATE ' . rex::getTable('neues_category') . ' SET uuid = uuid() WHERE uuid IS NULL OR uuid = ""');
$sql->setQuery('UPDATE ' . rex::getTable('neues_entry') . ' SET uuid = uuid() WHERE uuid IS NULL OR uuid = ""');

Neues::ensureDbScheme();

}

if (!rex_media::get('neues_entry_fallback_image.png')) {
Expand Down
8 changes: 4 additions & 4 deletions lib/neues.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

namespace FriendsOfRedaxo\Neues;

use rex;
use rex_fragment;
use rex_pager;
use rex_sql;
use rex_sql_table;
use rex;
use rex_sql_column;
use rex_sql_index;
use rex_sql_table;

class Neues
{
Expand Down Expand Up @@ -85,7 +85,7 @@ public static function ensureDbScheme()
->ensureIndex(new rex_sql_index('publishdate', ['publishdate']))
->ensureIndex(new rex_sql_index('description', ['description'], rex_sql_index::FULLTEXT))
->ensure();

rex_sql_table::get(rex::getTable('neues_category'))
->ensurePrimaryIdColumn()
->ensureColumn(new rex_sql_column('name', 'varchar(191)', false, ''))
Expand All @@ -106,7 +106,7 @@ public static function ensureDbScheme()
->ensureColumn(new rex_sql_column('be_user_id', 'text'))
->ensureColumn(new rex_sql_column('uuid', 'varchar(36)'))
->ensure();

rex_sql_table::get(rex::getTable('neues_entry_category_rel'))
->ensurePrimaryIdColumn()
->ensureColumn(new rex_sql_column('entry_id', 'int(10) unsigned'))
Expand Down

0 comments on commit bb3a055

Please sign in to comment.