[*] исправлены миграции под автообновление даты
This commit is contained in:
1 parent
a422976535
commit
657bc5ef77
6 files changed
+6
-6
No files matched your search
@@ -54,7 +54,7 @@
|
|||||||
'userDataTable' => User::isAuthorized() ? str_replace(
|
'userDataTable' => User::isAuthorized() ? str_replace(
|
||||||
'<table style="',
|
'<table style="',
|
||||||
'<table style="width:100%;',
|
'<table style="width:100%;',
|
||||||
SystemFunctions::arrayToTable($USER->getAllUserData(), 'Информация о пользователе')
|
SystemFunctions::arrayToTable($USER->getAllUserData(), 'Информация о текущем пользователе')
|
||||||
) : '',
|
) : '',
|
||||||
'statString' => 'Использовано ОЗУ: '
|
'statString' => 'Использовано ОЗУ: '
|
||||||
. round(memory_get_usage() / 1024 / 1024, 2) . ' МБ / БД: '
|
. round(memory_get_usage() / 1024 / 1024, 2) . ' МБ / БД: '
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ final class Users extends AbstractMigration
|
|||||||
->addColumn('token', 'string', ['limit' => 255, 'default' => null])
|
->addColumn('token', 'string', ['limit' => 255, 'default' => null])
|
||||||
->addColumn('last_active', 'string', ['limit' => 100, 'default' => null])
|
->addColumn('last_active', 'string', ['limit' => 100, 'default' => null])
|
||||||
->addColumn('date_created', 'datetime', ['default' => 'CURRENT_TIMESTAMP'])
|
->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(['login'])
|
||||||
->addIndex(['token'])
|
->addIndex(['token'])
|
||||||
->addIndex(['email'])
|
->addIndex(['email'])
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ final class Roles extends AbstractMigration
|
|||||||
$table->addColumn('name', 'text', ['default' => null])
|
$table->addColumn('name', 'text', ['default' => null])
|
||||||
->addColumn('description', 'text', ['default' => null])
|
->addColumn('description', 'text', ['default' => null])
|
||||||
->addColumn('date_created', 'datetime', ['default' => 'CURRENT_TIMESTAMP'])
|
->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();
|
->create();
|
||||||
$table->insert($this->data);
|
$table->insert($this->data);
|
||||||
$table->save();
|
$table->save();
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ final class Threads extends AbstractMigration
|
|||||||
->addColumn('attempts', 'integer', ['default' => 0])
|
->addColumn('attempts', 'integer', ['default' => 0])
|
||||||
->addColumn('attempts_limit', 'integer', ['default' => 1])
|
->addColumn('attempts_limit', 'integer', ['default' => 1])
|
||||||
->addColumn('date_created', 'datetime', ['default' => 'CURRENT_TIMESTAMP'])
|
->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('class', 'string', ['limit' => 255, 'default' => null])
|
||||||
->addColumn('method', 'string', ['limit' => 255, 'default' => null])
|
->addColumn('method', 'string', ['limit' => 255, 'default' => null])
|
||||||
->addColumn('params', 'text', ['default' => null])
|
->addColumn('params', 'text', ['default' => null])
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ final class ThreadsHistory extends AbstractMigration
|
|||||||
->addColumn('attempts', 'integer', ['default' => 0])
|
->addColumn('attempts', 'integer', ['default' => 0])
|
||||||
->addColumn('attempts_limit', 'integer', ['default' => 1])
|
->addColumn('attempts_limit', 'integer', ['default' => 1])
|
||||||
->addColumn('date_created', 'datetime', ['default' => 'CURRENT_TIMESTAMP'])
|
->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('class', 'string', ['limit' => 255, 'default' => null])
|
||||||
->addColumn('method', 'string', ['limit' => 255, 'default' => null])
|
->addColumn('method', 'string', ['limit' => 255, 'default' => null])
|
||||||
->addColumn('params', 'text', ['default' => null])
|
->addColumn('params', 'text', ['default' => null])
|
||||||
|
|||||||
@@ -51,10 +51,10 @@
|
|||||||
<div class="col-md">
|
<div class="col-md">
|
||||||
|
|
||||||
{% if isAuthorized %}
|
{% if isAuthorized %}
|
||||||
|
<h1>Добро пожаловать!</h1>
|
||||||
{{ userDataTable |raw }}
|
{{ userDataTable |raw }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<h1>Вы не авторизованы :(</h1>
|
<h1>Вы не авторизованы :(</h1>
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in new issue
Block a user