[*] исправлены миграции под автообновление даты

This commit is contained in:
rsgrinko committed 2023-07-07 14:36:54 +03:00
1 parent a422976535
commit 657bc5ef77
6 files changed
+6 -6

No files matched your search

+1 -1
View File
@@ -54,7 +54,7 @@
'userDataTable' => User::isAuthorized() ? str_replace(
'<table style="',
'<table style="width:100%;',
SystemFunctions::arrayToTable($USER->getAllUserData(), 'Информация о пользователе')
SystemFunctions::arrayToTable($USER->getAllUserData(), 'Информация о текущем пользователе')
) : '',
'statString' => 'Использовано ОЗУ: '
. round(memory_get_usage() / 1024 / 1024, 2) . ' МБ / БД: '
+1 -1
View File
@@ -42,7 +42,7 @@ final class Users extends AbstractMigration
->addColumn('token', 'string', ['limit' => 255, 'default' => null])
->addColumn('last_active', 'string', ['limit' => 100, 'default' => null])
->addColumn('date_created', 'datetime', ['default' => 'CURRENT_TIMESTAMP'])
->addColumn('date_updated', 'datetime', ['null' => true, 'default' => null])
->addColumn('date_updated', 'datetime', ['null' => true, 'default' => null, 'update' => 'CURRENT_TIMESTAMP'])
->addIndex(['login'])
->addIndex(['token'])
->addIndex(['email'])
+1 -1
View File
@@ -48,7 +48,7 @@ final class Roles extends AbstractMigration
$table->addColumn('name', 'text', ['default' => null])
->addColumn('description', 'text', ['default' => null])
->addColumn('date_created', 'datetime', ['default' => 'CURRENT_TIMESTAMP'])
->addColumn('date_updated', 'datetime', ['null' => true, 'default' => null])
->addColumn('date_updated', 'datetime', ['null' => true, 'default' => null, 'update' => 'CURRENT_TIMESTAMP'])
->create();
$table->insert($this->data);
$table->save();
+1 -1
View File
@@ -20,7 +20,7 @@ final class Threads extends AbstractMigration
->addColumn('attempts', 'integer', ['default' => 0])
->addColumn('attempts_limit', 'integer', ['default' => 1])
->addColumn('date_created', 'datetime', ['default' => 'CURRENT_TIMESTAMP'])
->addColumn('date_updated', 'datetime', ['null' => true, 'default' => null])
->addColumn('date_updated', 'datetime', ['null' => true, 'default' => null, 'update' => 'CURRENT_TIMESTAMP'])
->addColumn('class', 'string', ['limit' => 255, 'default' => null])
->addColumn('method', 'string', ['limit' => 255, 'default' => null])
->addColumn('params', 'text', ['default' => null])
@@ -19,7 +19,7 @@ final class ThreadsHistory extends AbstractMigration
->addColumn('attempts', 'integer', ['default' => 0])
->addColumn('attempts_limit', 'integer', ['default' => 1])
->addColumn('date_created', 'datetime', ['default' => 'CURRENT_TIMESTAMP'])
->addColumn('date_updated', 'datetime', ['null' => true, 'default' => null])
->addColumn('date_updated', 'datetime', ['null' => true, 'default' => null, 'update' => 'CURRENT_TIMESTAMP'])
->addColumn('class', 'string', ['limit' => 255, 'default' => null])
->addColumn('method', 'string', ['limit' => 255, 'default' => null])
->addColumn('params', 'text', ['default' => null])
+1 -1
View File
@@ -51,10 +51,10 @@
<div class="col-md">
{% if isAuthorized %}
<h1>Добро пожаловать!</h1>
{{ userDataTable |raw }}
{% else %}
<h1>Вы не авторизованы :(</h1>
{% endif %}
</div>