I am creating a login/register program with SQLite database and I wonder how can I insert a row to a database while passing only 4 out of 7 columns and leave first three (id, status and type) blank so they are filled with database default values. How can I do something like that? I tried passing just 4 arguments but it wont work in any way I try.
username = input("username: ")
name = input("name: ")
password = input("password: ")
email = input("email: ")
salt = 'xxxxx'
hexdex = hashlib.sha512((password + salt).encode()).hexdigest()
con = sqlite3.connect('database/database.db')
cur = con.cursor()
cur.execute("INSERT INTO users VALUES (DEFAULT, DEFAULT, DEFAULT, (?), (?), (?), (?))", (username, name, hexdex, email))
con.commit()
con.close()