My tables are listed as models in Python, which then turn into MySQL Django tables. In Python:
class my_table(models.Model):
is_correct = models.IntegerField(default = 0)
If I insert into this table, I want it to automatically insert 0 for the column is_correct, unless I specify a different value. I also want this to happen if I use raw sql or if I paste from a MySQL stored procedure.
The argument defaultseems to work only with Python. This does not translate into something that MySQL sees. Is it possible?
source
share