Code Monkey home page Code Monkey logo

Comments (2)

coleifer avatar coleifer commented on June 5, 2024

I cannot replicate.

Here is the table you provided

im-1693919717809

Dropping the test1 column

im-1693919727103

This is working fine and the column is dropped successfully:

im-1693919809081

from sqlite-web.

LunarTwilight avatar LunarTwilight commented on June 5, 2024

Weird, now I can't reproduce it either. I can get an "internal server error" page if I try to drop the only row in a table tho.

[2023-09-06 05:07:02,478] ERROR in app: Exception on /test/drop-column/ [POST] 
    Traceback (most recent call last): 
      File "/usr/local/lib/python3.10/dist-packages/peewee.py", line 3197, in execute_sql 
        cursor.execute(sql, params or ()) 
    sqlite3.OperationalError: near ")": syntax error 
     
    During handling of the above exception, another exception occurred: 
     
    Traceback (most recent call last): 
      File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 2525, in wsgi_app 
        response = self.full_dispatch_request() 
      File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 1822, in full_dispatch_request 
        rv = self.handle_user_exception(e) 
      File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 1820, in full_dispatch_request 
        rv = self.dispatch_request() 
      File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 1796, in dispatch_request 
        return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) 
      File "/usr/local/lib/python3.10/dist-packages/sqlite_web/sqlite_web.py", line 248, in inner 
        return fn(table, *args, **kwargs) 
      File "/usr/local/lib/python3.10/dist-packages/sqlite_web/sqlite_web.py", line 347, in drop_column 
        migrate(migrator.drop_column(table, name)) 
      File "/usr/local/lib/python3.10/dist-packages/playhouse/migrate.py", line 886, in migrate 
        operation.run() 
      File "/usr/local/lib/python3.10/dist-packages/playhouse/migrate.py", line 164, in run 
        self._handle_result(method(*self.args, **kwargs)) 
      File "/usr/local/lib/python3.10/dist-packages/playhouse/migrate.py", line 155, in _handle_result 
        result.run() 
      File "/usr/local/lib/python3.10/dist-packages/playhouse/migrate.py", line 164, in run 
        self._handle_result(method(*self.args, **kwargs)) 
      File "/usr/local/lib/python3.10/dist-packages/playhouse/migrate.py", line 158, in _handle_result 
        self._handle_result(item) 
      File "/usr/local/lib/python3.10/dist-packages/playhouse/migrate.py", line 153, in _handle_result 
        self.execute(result) 
      File "/usr/local/lib/python3.10/dist-packages/playhouse/migrate.py", line 149, in execute 
        self.migrator.database.execute(node) 
      File "/usr/local/lib/python3.10/dist-packages/peewee.py", line 3210, in execute 
        return self.execute_sql(sql, params, commit=commit) 
      File "/usr/local/lib/python3.10/dist-packages/peewee.py", line 3194, in execute_sql 
        with __exception_wrapper__: 
      File "/usr/local/lib/python3.10/dist-packages/peewee.py", line 2970, in __exit__ 
        reraise(new_type, new_type(exc_value, *exc_args), traceback) 
      File "/usr/local/lib/python3.10/dist-packages/peewee.py", line 191, in reraise 
        raise value.with_traceback(tb) 
      File "/usr/local/lib/python3.10/dist-packages/peewee.py", line 3197, in execute_sql 
        cursor.execute(sql, params or ()) 
    peewee.OperationalError: near ")": syntax error 

from sqlite-web.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.