Fix ID integer length error & change those pesky tabulations

This commit is contained in:
Little Fluffy Clouds 2025-07-11 12:12:20 +03:00
parent ced4e3241c
commit 49f7601376
10 changed files with 981 additions and 979 deletions

View File

@ -60,7 +60,7 @@ final class account extends core
$this->database = new database()
->encoding(encoding::utf8)
->columns(
new column('identifier', type::integer_unsigned),
new column('identifier', type::long_long_unsigned),
new column('name', type::string, ['length' => 64]),
new column('language', type::string, ['length' => 2]),
new column('authorized_system', type::char),

View File

@ -61,7 +61,7 @@ final class answer extends core
$this->database = new database()
->encoding(encoding::ascii)
->columns(
new column('identifier', type::integer_unsigned),
new column('identifier', type::long_long_unsigned),
new column('A', type::char),
new column('B', type::char),
new column('C', type::char),

View File

@ -67,7 +67,7 @@ final class connection extends core
->columns(
new column('identifier', type::integer_unsigned),
new column('account', type::integer_unsigned),
new column('telegram', type::integer_unsigned),
new column('telegram', type::long_long_unsigned),
new column('active', type::char),
new column('updated', type::integer_unsigned),
new column('created', type::integer_unsigned)

View File

@ -59,7 +59,7 @@ final class question extends core
$this->database = new database()
->encoding(encoding::ascii)
->columns(
new column('identifier', type::integer_unsigned),
new column('identifier', type::long_long_unsigned),
new column('active', type::char),
new column('updated', type::integer_unsigned),
new column('created', type::integer_unsigned)

View File

@ -61,7 +61,7 @@ final class localization extends core
$this->database = new database()
->encoding(encoding::ascii)
->columns(
new column('identifier', type::integer_unsigned),
new column('identifier', type::long_long_unsigned),
new column('text', type::string, ['length' => 256]),
new column('A', type::string, ['length' => 128]),
new column('B', type::string, ['length' => 128]),

View File

@ -60,7 +60,7 @@ final class telegram extends core
$this->database = new database()
->encoding(encoding::utf8)
->columns(
new column('identifier', type::integer_unsigned),
new column('identifier', type::long_long_unsigned),
new column('domain', type::string, ['length' => 32]),
new column('name_first', type::string, ['length' => 64]),
new column('name_second', type::string, ['length' => 64]),
@ -106,7 +106,7 @@ final class telegram extends core
update: function (record &$record) use ($telegram){
// Writing new values into the record
$record->name_first = $telegram->getFirstName();
$record->name_second = $telegram->getLastName();
$record->name_second = (string) $telegram->getLastName();
$record->domain = $telegram->getUsername();
$record->updated = svoboda::timestamp();
},
@ -171,12 +171,14 @@ final class telegram extends core
// Initializing the identifier
$identifier = (int) $telegram->getId();
echo(svoboda::timestamp());
// Initializing the record
$record = $this->database->record(
$identifier,
$telegram->getUsername(),
$telegram->getFirstName(),
$telegram->getLastName(),
(string) $telegram->getLastName(),
$telegram->getLanguageCode(),
(int) $telegram->isBot(),
svoboda::timestamp(),

View File

@ -19,9 +19,9 @@ use Zanzara\Zanzara as zanzara,
Zanzara\Config as config;
// Enabling debugging
/* ini_set('error_reporting', E_ALL);
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1); */
// ini_set('error_reporting', E_ALL);
// ini_set('display_errors', 1);
// ini_set('display_startup_errors', 1);
// Initializing path to the public directory
define('INDEX', __DIR__);

View File

@ -23,14 +23,14 @@ $file = DATABASES . DIRECTORY_SEPARATOR . 'telegram.baza';
$database = new database()
->encoding(encoding::utf8)
->columns(
new column('identifier', type::integer_unsigned),
new column('identifier', type::long_long_unsigned),
new column('domain', type::string, ['length' => 32]),
new column('name_first', type::string, ['length' => 64]),
new column('name_second', type::string, ['length' => 64]),
new column('language', type::string, ['length' => 2]),
new column('robot', type::char),
new column('updated', type::integer_unsigned),
new column('created', type::integer_unsigned)
new column('updated', type::integer),
new column('created', type::integer)
)
->connect($file);