Answer the question
In order to leave comments, you need to log in
Error with SQL when starting a bot in telegram - how to solve it?
Why in the 'status' column, if I set the values:
status BOOLEAN NOT NULL
DEFAULT (TRUE)
then when starting the telegram does not respond to the commands '/subscribe' , '/unsubscibe'
In a tabular form, the status is '1'
In the console
sqlite3.DatabaseError: malformed database schema (subscriptions) - default value of column [status] is not constant
CREATE TABLE subscriptions (
id INTEGER PRIMARY KEY AUTOINCREMENT,
user_id VARCHAR (255) NOT NULL,
status BOOLEAN NOT NULL
);
Answer the question
In order to leave comments, you need to log in
Run sqlite, open your database and type in the console
.schema subscriptions
insert into subscriptions (user_id) values ('a');
insert into subscriptions (user_id, status) values ('b', true);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question