We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docker exec -it adminpls python3 -m flask scheduler-reset
The above command produces an error when it gets to the TRUNCATE TABLE sql command, as shown below.
sqlalchemy.exc.ArgumentError: Textual SQL expression 'TRUNCATE TABLE task_scheduler C...' should be explicitly declared as text('TRUNCATE TABLE task_scheduler C...')
The text was updated successfully, but these errors were encountered:
Problem solved.
I added the following import statement:
from sqlalchemy import text
And modified the TRUNCATE TABLE lines of code, as follows:
TRUNCATE TABLE
t = text("TRUNCATE TABLE task_scheduler CASCADE") db.session.execute(t) #db.session.execute('TRUNCATE TABLE task_scheduler CASCADE') t = text("TRUNCATE TABLE task_list CASCADE") db.session.execute(t) #db.session.execute('TRUNCATE TABLE task_list CASCADE')
Where it can be seen that I used the text method to create a sql variable that could be interpreted by sqlalchemy package.
text
Happy days!
Sorry, something went wrong.
No branches or pull requests
The above command produces an error when it gets to the TRUNCATE TABLE sql command, as shown below.
The text was updated successfully, but these errors were encountered: