So, here's my problem
i am making an application on Flask using the SQLAlchemy ORM
now the problem is, i may have messed up the creating of a table user;
in the models.py the code looks like,
class User(db.Model):
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(50))
username = db.Column(db.String(25), unique=True)
password = db.Column(db.String(50))
email = db.Column(db.VARCHAR(50), unique=True)
registerdate= db.Column(db.DateTime)
def __init__(self,
name,
username,
password,
email,
registerdate=None):
self.name = name
self.username = username
self.password = password
self.email = email
if registerdate is None:
registerdate = datetime.utcnow()
self.registerdate = registerdate
Now, the error is something like
OperationalError: table User has no column named user_name
this is because i messed up the table creation, creating the table with the column "user_name" first, when it gave me an error related to the underscores, i tried to modify the code but instead ran into another error...
so how do i delete the previous 'User' table in SQL Alchemy ORM without using the usual sqlite3 syntax and commands?
P.S : I am using the ubuntu 16.04 python terminal, no IDE like Atom or Pycharm and stuff ...