It is critically important for me that some of the fields in the database are of these types.
create table Statistics
(
ID INTEGER not null
primary key autoincrement
unique,
PacketsCount UNSIGNED BIG INT,
FilesCount UNSIGNED BIG INT,
ErrorsCount UNSIGNED BIG INT,
DBConnected BOOLEAN default 0 not null
);
For this script, I use the following model:
struct statistics {
int id;
std::optional<uint64_t> packets_count;
std::optional<uint64_t> files_count;
std::optional<uint64_t> errors_count;
bool db_connected;
};
make_table("Statistics",
make_column("ID", &statistics::id, primary_key().autoincrement()),
make_column("PacketsCount", &statistics::packets_count),
make_column("FilesCount", &statistics::files_count),
make_column("ErrorsCount", &statistics::errors_count),
make_column("DBConnected", &statistics::db_connected, default_value(false))
),
But as a result, when calling sync_schema I get the following table
create table Statistics
(
ID INTEGER not null
primary key autoincrement,
PacketsCount INTEGER,
FilesCount INTEGER,
ErrorsCount INTEGER,
DBConnected INTEGER default 0 not null
);
How can I solve this problem?
It is critically important for me that some of the fields in the database are of these types.
For this script, I use the following model:
But as a result, when calling
sync_schemaI get the following tableHow can I solve this problem?