I'm having an issue I don't really know how to approach with Python Flask. For reference, I'm using SQL-Alchemy and flask-migrate for the database. That said. I'm getting the following error: "table guilds model already exists" when I run the command flask db upgrade. I have run this command immediately after creating a new migration with the command ' flask db migrate -m "Guilds Creation Migration" '. The flask upgrade command normally does exactly as it says. To quote the person who wrote flask-migrate "The flask DB migrate command does not make any changes to the database, it just generates the migration script. To apply the changes to the database, the flask DB upgrade command must be used." Inside the models.py file the code used to generate the table it is making reference to is the following:
class GuildModel(db.Model):
id = db.Column(db.Integer, primary_key=True)
GuildName = db.Column(db.String(300), index=True, unique=True)
GuildDescription = db.Column(db.String(64))
def __repr__(self):
return '<Guild {}>'.format(self.GuildName)
I have no real idea of how to resolve this problem or what is causing it. The searches I have done for a solution to this problem have not really returned much of anything. Any help would be very much appreciated
(Ps: The database I'm using is SQLite)